diff options
| author | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-04-22 21:29:06 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mikisabate@gmail.com> | 2025-04-22 21:29:06 +0200 |
| commit | 1de9228fda28826c337ac09201586de1f2f248b9 (patch) | |
| tree | 3db67eb9ec171ba11cb66b2a70db973b8c1c76ff /arch/riscv/user/hwprobe/README.md | |
| parent | 74caba366d3fafd21910f3d95dbc2819267c52bc (diff) | |
| download | farga-1de9228fda28826c337ac09201586de1f2f248b9.tar.gz farga-1de9228fda28826c337ac09201586de1f2f248b9.zip | |
riscv: user: Force LINUX_HEADERS on hwprobe
Signed-off-by: Miquel Sabaté Solà <mikisabate@gmail.com>
Diffstat (limited to 'arch/riscv/user/hwprobe/README.md')
| -rw-r--r-- | arch/riscv/user/hwprobe/README.md | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/arch/riscv/user/hwprobe/README.md b/arch/riscv/user/hwprobe/README.md new file mode 100644 index 0000000..58f09c1 --- /dev/null +++ b/arch/riscv/user/hwprobe/README.md @@ -0,0 +1,36 @@ +The RISC-V support for the Linux kernel has a new system call which is specific +to it, called `hwprobe`. With this system call you can check which features, +extensions, etc. are available on the current machine. + +In order to build this example you need Linux headers for the RISC-V +architecture. You can achieve this in two ways: + +1. Simply install the Linux headers from your distribution if you are already + using a RISC-V machine. +2. Build the Linux kernel and use the `LINUX_HEADERS` environment variable to + point to the headers directory (i.e. the directory produced by `make + headers_install`) + +After that, build it and run it. On a QEMU machine I got the following: + +``` +Supports base extensions I, M, A? yes + +We got back this bit map: 0000001110001101001010000001000100100000000000000000000011111011; which means: + +F, D: OK +C: OK +ZBA: OK +ZBB: OK +ZBS: OK +ZICBOZ: OK +ZBC: OK +ZIHINTNTL: OK +ZFA: OK +ZIHINTPAUSE: OK +ZCA: OK +ZCD: OK +ZAWRS: OK +ZICNTR: OK +ZIHPM: OK +``` |
