Human Readable Decoding of /proc/cpuinfo for Arm Processors

One of the most common way to get CPU information is to check the content of /proc/cpuinfo. For example, this is the output I get from running the command on NanoPi NEO (Allwinner H3) board:


Many fields are self-explanatory, but what about CPU implementer and CPU part numbers? Those are values stored in Arm’s CPUID Base Register, and 0x41 looks up to Arm implementer, while 0xc07 refers to Cortex A7. But I had to look it up to find out.

One solution would be to decode those values in the kernel, but the developers won’t do that probably because it may break user-space programs that rely on hexadecimal values. So instead,

In the meantime, I could try it out by compiling the code myself:


Let’s now run our freshly compiled lscpu to see if an Arm Cortex A7 processor is detected:


It works as ARM Cortex-A7 revision 5 is shown. It does not follow Arm’s new lower case logo / name, but who cares 🙂 We can see most of the information provided by /proc/cpuinfo and more, but the BogoMIPS number is different, and the last three lines with Hardware, Revision and Serial are not shown.

It’d be particular interesting to test it on products or boards with processors featuring custom Arm cores such as you should get values like “Qualcomm Krait” or “Marvell PJ4/PJ4b”.

Share this:

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

Radxa Orion O6 Armv9 mini-ITX motherboard
Subscribe
Notify of
guest
The comment form collects your name, email and content to allow us keep track of the comments placed on the website. Please read and accept our website Terms and Privacy Policy to post a comment.
15 Comments
oldest
newest
Boardcon CM3588 Rockchip RK3588 System-on-Module designed for AI and IoT applications