Attention is currently required from: Arthur Heymans, Maximilian Brune, Philipp Hug.
Hello Arthur Heymans, Maximilian Brune, Philipp Hug, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/81090?usp=email
to look at the new patch set (#9).
Change subject: arch/riscv: use PMP ......................................................................
arch/riscv: use PMP
With this change, a simple S-mode payload works: 1: li a7, 1 li a0, 48 ecall j 1b
Without this change, it will not work.
Linux also boots with this on the command line: clk_ignore_unused
Resolving that problem will require a separate patch.
Getting this to build on RV32 required changes to the API, as it was incorrect. In RV32, PMP entries are 34 bits. Hence, the setup_pmp needed to accept u64. So, uinptr_t can not be used, as on 32 bits they are only 32 bit numbers. The internal API uses uintptr_t, but the exported API uses u64, so external code does not have to think about right shifts on base and size.
Errors are detected: an error in base and size will result in a BIOS_EMERG print, but not a panic. Boots not bricks if possible.
There are small changes to the internal API to reduce stack pressure: there's no need to have two pmpcfg_t on the stack when one will do.
Change-Id: I8d7dd171ee69e83f3b904df38c7e2d36cc46a62e Signed-off-by: Ronald G Minnich rminnich@gmail.com --- M src/arch/riscv/include/arch/pmp.h M src/arch/riscv/payload.c M src/arch/riscv/pmp.c 3 files changed, 109 insertions(+), 25 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/81090/9