有谁知道在哪里定义硬件,版本和序列号. /proc/cpuinfo的字段? [英] Does anyone know where to define the hardware, revision and serial no. fields of /proc/cpuinfo?

查看:175
本文介绍了有谁知道在哪里定义硬件,版本和序列号. /proc/cpuinfo的字段?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确保/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?

推荐答案

这取决于Linux的版本和处理器体系结构.由于这是TI ARM,因此您可以从以下内容开始:arch/arm/kernel/setup.c .

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.

寻找static int c_show().

修订序列值是通过 引导加载程序 可以将它们传递给Linux.通常,您无需在代码中进行设置,而是将它们用作条件,以处理无法在运行时在计算机文件或驱动程序中检测到的硬件变化.

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.

这篇关于有谁知道在哪里定义硬件,版本和序列号. /proc/cpuinfo的字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆