]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[riscv] Add support for checking CPU extensions reported via device tree
authorMichael Brown <mcb30@ipxe.org>
Mon, 28 Oct 2024 11:44:41 +0000 (11:44 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 28 Oct 2024 13:55:00 +0000 (13:55 +0000)
commitb0a8eabbf4d32d789686c32809750f95986dc7cb
treeb5fb7387630c65e5ea62545f86a8716dee36e512
parent74710b8316b40c9e3081c1014813867d4764796b
[riscv] Add support for checking CPU extensions reported via device tree

RISC-V seems to allow for direct discovery of CPU features only from
M-mode (e.g. by setting up a trap handler and then attempting to
access a CSR), with S-mode code expected to read the resulting
constructed ISA description from the device tree.

Add the ability to check for the presence of named extensions listed
in the "riscv,isa" property of the device tree node corresponding to
the boot hart.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/riscv/core/hart.c [new file with mode: 0644]
src/arch/riscv/include/bits/errfile.h
src/arch/riscv/include/ipxe/hart.h [new file with mode: 0644]