Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone know where to define the hardware, revision and serial no. fields of /proc/cpuinfo?

I want to ensure my /proc/cpuinfo is accurate. It currently outputs

Hardware        : am335xevm
Revision        : 0000
Serial          : 0000000000000000

where in the code can I change this to give real values?

like image 529
fred basset Avatar asked May 31 '13 21:05

fred basset


1 Answers

It depends on the version of Linux and processor architecture. Since this is a TI ARM, you can start with: arch/arm/kernel/setup.c.

Look for static int c_show().

The Revision and Serial values are set with ATAG_REVISION and ATAG_SERIAL, so an appropriate boot loader can pass them to Linux. Typically you do not set these in the code but use them as conditionals to handle hardware variations that can not be detected at run time in a machine file or driver.

like image 121
Peter L. Avatar answered Sep 24 '22 08:09

Peter L.