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

get RISC-V CPU info on Linux #650

Open
bgoglin opened this issue Jan 23, 2024 · 0 comments
Open

get RISC-V CPU info on Linux #650

bgoglin opened this issue Jan 23, 2024 · 0 comments

Comments

@bgoglin
Copy link
Contributor

bgoglin commented Jan 23, 2024

/proc/cpuinfo on RISC-V reports something like below on SiFive U74 cores:

processor	: 0
hart		: 2
isa		: rv64imafdc
mmu		: sv39
uarch		: sifive,u74-mc
[...]

RISC-V has a syscall "sys_riscv_hwprobe()" to query CPU info since Linux kernel 6.4. When we'll find a machine supporting it, check what it returns compared to what's in /proc/cpuinfo
It's documented at https://www.kernel.org/doc/html/next/arch/riscv/hwprobe.html

@bgoglin bgoglin added this to the Future milestone Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant