Pandaboard ES identifying CPU bitness

37 views
Skip to first unread message

Sn3akyP3t3

unread,
Apr 2, 2014, 1:18:55 AM4/2/14
to panda...@googlegroups.com
I installed 32 bit Ubuntu 13.10 server to my Pandaboard ES some time ago.  I was viewing over options to identify CPU bitness, but couldn't find anything conclusive to identify bitness.  What command would I be able to use to identify the bitness of the CPU architecture?

I tried the following already:
cat /proc/cpuinfo
grep flags /proc/cpuinfo
lscpu
uname -m

I've tried searching around for definitive information on the CPU architecture of armv7l, but I can't positively identify bitness.


Tom Mitchell

unread,
Apr 2, 2014, 10:51:39 PM4/2/14
to panda...@googlegroups.com
The easy way is to write a small program with a structure of data and inspect it bit by bit.
Another way is to use the xdr library.   External data representation has a standard bit, 
byte, etc. order rather than put the xdr on the wire look at it and compare to
the input to xdr.   Recall the shift and mask  operations in C.

Look at the bit pattern for 0xA5 and 0x5A.   
Note that ASCII on the web has a standard bit order too.


If you are looking at hardware bits read some safe to read registers with expected data
in expected bit fields.  Always consult hardware documents.

See also: http://www.linuxjournal.com/article/6788 "Byte and Bit Order Dissection
Sep 02, 2003  By Kevin Kaichuan He"

This is a better question than some might think because some processors 
can boot in one or another way so you have to know something about the
lowest level of software (pre Boot ROM) or test for it.   Some I/O hardware
can have coprocessors that have a different setup than the system processor.

XDR is the most portable library for the tool kit that I can think of in this regard.


--
You received this message because you are subscribed to the Google Groups "pandaboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandaboard+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
  T o m    M i t c h e l l

Sn3akyP3t3

unread,
Apr 4, 2014, 12:11:57 AM4/4/14
to panda...@googlegroups.com
Thanks!  I think I have my work cut out for me then!  I've never heard of the XDR library, but I see its available to Python so I'll kick it around a bit.

Geoffrey Atkinson

unread,
Apr 4, 2014, 4:00:21 PM4/4/14
to panda...@googlegroups.com
IIRC OMAP processors are all little endian.

Tom Mitchell

unread,
Apr 6, 2014, 5:08:04 AM4/6/14
to panda...@googlegroups.com
Do consult the ARM Architectural Reference Manual.   There are hooks to do
almost anything that is needed..... pay attention to the details... mixed endian 
hardware support....

http://www.arium.com/pdf/Endianness.pdf
"The ARM Architectural Reference Manual states that ARM processors are bi-endian, meaning they can operate in
either little-endian or big-endian modes. The ARM processor does not have any instructions or features that affect
endianness. The endianness of the system as a whole is determined by the circuitry that connects the processor to 
its peripheral devices."

......from the reference manual...
"A2.7 Endian support
This section discusses memory and memory-mapped I/O, with regard to the assumptions ARM processor 
implementations make about endianness.
ARMv6 introduces several architectural extensions to support mixed-endian access in hardware:
• Byte reverse instructions that operate on general-purpose register contents to support word, and 
signed and unsigned halfword data quantities.
• Separate instruction and data endianness, with instructions fixed as little-endian format, naturally 
aligned, but with legacy support for 32-bit word-invariant binary images/ROM."
Reply all
Reply to author
Forward
0 new messages