Does anyone know where to define the hardware, rev

2019-04-26 04:40发布

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?

1条回答
放荡不羁爱自由
2楼-- · 2019-04-26 05:20

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.

查看更多
登录 后发表回答