# how to determine architecture core detail of ARM11 processor

I'm cross-compiling for an embedded Linux board, based in BCM5892 ARM11 processor.

I need to know about architecture detail of this processor(‘armv6’, ‘armv6j’, ‘armv6k’, ‘armv6kz’, ‘armv6t2’, ‘armv6z’, ‘armv6zk’) for feeding -mcpu flag for compiling my application, but there is no such information in Broadcom website and manufacturer does not provide any information too.

then is there any way for determining this information from Processor or OS?

• Hi, I recommend you "unaccept" my answer, and accept the newer, better answer from Guillermo. I can't remove my answer, while it is still "accepted". Thanks! – SamGibson Oct 8 '20 at 1:09

From this website, the answer is ARMv6TEJ:

~ \$ cat /proc/cpuinfo
Processor       : ARMv6-compatible processor rev 5 (v6l)
BogoMIPS        : 398.13
Features        : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant     : 0x1
CPU part        : 0xb36
CPU revision    : 5

Revision        : 0000
Serial          : 0000000000000000


Also confirmed from the Linux boot messages here:

[ 0.000000] Linux version 2.6.32.9 (root@localhost.localdomain) (gcc version 4.2.3) #72 PREEMPT Mon Mar 19 01:37:54 EDT 2012
[ 0.000000] CPU: ARMv6-compatible processor [4117b365] revision 5 (ARMv6TEJ), cr=00c5387d
[ 0.000000] CPU: VIPT aliasing data cache, VIPT aliasing instruction cache
[ 0.000000] Machine: Broadcom BCM5892 Chip


Note that your examples ‘armv6’, ‘armv6j’, ‘armv6k’, ‘armv6kz’, ‘armv6t2’, ‘armv6z’, ‘armv6zk’ are architecture variants, not CPUs. They will go under -march argument.

Due to the processor model you mentioned I think your embedded system is a POS (Point of Sale).

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dht0001a/CHDCDJCJ.html

The corresponding arch for that processor is armv6z. To avoid "locking down" the code to working well only on a single CPU model, you can use the -mtune flag (receives same arguments that -mcpu) that will produce the best code for a specified CPU, while keeping compatibility across all selected arch CPUs.

The CPU type is arm1136j-s (missing f, as I have not seen any POS with ARM11 processor that supports hard-float).

EDIT

I got CPU wrong, according to this mail: https://lists.linaro.org/pipermail/linaro-dev/2011-September/007156.html . The CPU type is ARM1136, not ARM1176. So it will be -mcpu=arm1136j-s

Your arguments can be like the following:

• -march=armv6 -mtune=arm1136j-s
• -mcpu=arm1136j-s
• Guillermo, you are right, It's an EFTPOS device and I have more than 10 models from 3 separate brands with the same processor which proves me it's very popular among payment terminal manufacturers companies. Thanks for the information. – Mahmoud Hosseinipour May 18 '20 at 17:12
• Good research +1 - this is a better answer than mine (looking back, I didn't actually answer the OP's question about what to supply to the -mcpu flag; don't know how I missed that). However I can't delete my answer, as the OP accepted it. Just one point: Your latest update says it should be "-mcpu=arm1136j-s" but at the bottom, it still has the previous version saying "-mcpu=arm1176jz-s". Do you want to update that? And is the -mtune setting still correct? – SamGibson Oct 8 '20 at 1:06
• Hi @SamGibson, updated. Yes, for all ARM GCC you can either set the CPU so it produces code "specifically" for that CPU (may run on others, but GCC will take advantage of all specified CPU characteristics), or set an arch and then the tune option so it keeps compatibility with all CPUs from selected arch or higher (recommended, unless you know that your compiled program will only run on a specific device). – Guillermo Garcia Maynez Oct 11 '20 at 5:21

If you are running on a Linux system, you can use 'cat /proc/cpuinfo' to get some more details about the CPU. Your feature details set may be listed there.