Skip to content

get RISC-V CPU info on Linux #650

@bgoglin

Description

@bgoglin

/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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions