Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

调研dmidecode对riscv的支持情况 #428

Open
laokz opened this issue Apr 9, 2024 · 4 comments
Open

调研dmidecode对riscv的支持情况 #428

laokz opened this issue Apr 9, 2024 · 4 comments
Assignees
Labels
Assigned enhancement New feature or request

Comments

@laokz
Copy link
Contributor

laokz commented Apr 9, 2024

https://gitee.com/openeuler/RISC-V/issues/I9AT18

@laokz laokz added enhancement New feature or request Unassigned labels Apr 9, 2024
@FeiFei0827
Copy link
Contributor

调研dmidecode对riscv的支持情况

首先调研在ubuntu下的理想输出

sudo demidecode ->output.txt

信息太多了,有一万多行的输出

使用openEuler 22.03 riscv进行测试

[root@openEuler-riscv64 ~]# dmidecode -bash: dmidecode: command not found

似乎并不支持

从官网拉下来源码 由于23.09 是3.4版本 这里下载的也是3.4

安装完发现下载的是3.5 -_-

[Index of /releases/dmidecode/ (gnu.org)](https://download.savannah.gnu.org/releases/dmidecode/)

结果

image-20240410155135106

可以看到错误原因是一致的

在openeuler x86 上测试

一切正常,我将输出的结果放到[飞飞肥/openEuler RISC-V 23.09 执行 dmidecode -t memory 和 dmidecode -t bios 无法查询到相关信息 (gitee.com)](https://gitee.com/feifei-fertilizer/dmidecode)

openeuler riscv 23.09

我运行这个镜像总是很慢 并且终端会坏掉 不知道原因 image-20240411003657560

但是真的令人恼火

重启我的ubuntu就莫名奇妙的好了,真的太神奇啦

分析结果

/sys/firmware是存储固件信息的

riscv

openat(AT_FDCWD, "/sys/firmware/dmi/tables/smbios_entry_point", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/firmware/efi/systab", O_RDONLY) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/proc/efi/systab", O_RDONLY) = -1 ENOENT (No such file or directory)


x86

openat(AT_FDCWD, "/sys/firmware/dmi/tables/smbios_entry_point", O_RDONLY) = 3

在sys/firmware/下并没有dmi文件夹的相关信息

对比openEuler x86

image-20240411090027249

显然是拥有的

由于dmi是可以人为修改的 这里强行将x86的信息导入rv来查看功能是否正常

做不到,似乎需要硬件厂商进行修改或是固件更新(知识盲区)

我无法直接导入一份信息来测试是否dmidecode有功能方面的缺陷

dmi信息应该由固件写入,能力有限,暂时不知道该怎么解决

猜测正常写入信息就能成功

一些调研得到的材料

[飞飞肥/openEuler RISC-V 23.09 执行 dmidecode -t memory 和 dmidecode -t bios 无法查询
到相关信息 (gitee.com)
](https://gitee.com/feifei-fertilizer/dmidecode)

###一些疑问
dmi信息不同的发行版存储的位置不同 有的位于class下有的位于firmware下,这只是简单的设计思路不同么?

@laokz
Copy link
Contributor Author

laokz commented Apr 11, 2024 via email

@laokz
Copy link
Contributor Author

laokz commented Apr 11, 2024

riscv/riscv-smbios#11

https://mail.gnu.org/archive/html/qemu-riscv/2024-01/msg00673.html

以上信息显示dmicode在rv上不能正常工作是预期结果。

@FeiFei0827
Copy link
Contributor

ubuntu是x86 并没有测试其他riscv os的情况

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Assigned enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants