linux内核读取smbios,linux – dmidecode在哪里获得SMBIOS表?

我总是有这个问题,在阅读了man-page并在线搜索后没有得到答案.任何了解此问题的人请发表评论.

我知道SMBIOS表或DMI表是dmidecode定位和解析的内容.但它从何而来?它是否采用Linux中的文件格式?

解决方法:

看起来它来自/ dev / mem

root@aw42e ~]# strace -F -e open dmidecode -t 17

open("/sys/firmware/efi/systab", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/proc/efi/systab", O_RDONLY) = -1 ENOENT (No such file or directory)

open("/dev/mem", O_RDONLY) = 3

SMBIOS 2.5 present.

open("/dev/mem", O_RDONLY) = 3

Handle 0x0016, DMI type 17, 27 bytes

Memory Device

/ dev / mem被描述为

mem is a character device file that is an image of the main memory of

the computer. It may be used, for example, to examine (and even patch)

the system. Byte addresses in mem are interpreted as physical memory

addresses.

所以要回答,它包含在/ dev / mem中

我正在寻找更多信息,但我认为内核在启动时将DMI表插入内存 – 来自man dmidecode

As you run it, dmidecode will try to locate the DMI table. If it

succeeds, it will then parse this table and

display a list of records like this one:

标签:linux,x86,bios

来源: https://codeday.me/bug/20190713/1453527.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值