target/riscv/cpu.c: enable PMP by default for profile CPUs
PATCH 1/1 target/riscv/cpu.c: enable PMP by default for profile CPUs
The new OpenSBI v1.8 release is not happy about PMP being disabled in the profile CPUs [1], showing a:
init_coldboot: hart isolation configure failed (error -3)
error when booting. It seems benign given that it doesn't affect anything else during boot, but still a rather unpleasant message.
We do not have RISC-V profiles that mandates PMP to be enabled. That said, most of our other CPUs enables PMP by default. Setting it to 'on' for profile CPUs allows for a more standard experience between CPUs. And it's not like enabling PMP will bring any additional extensions to the CPU either, meaning that we can still claim a certain level of design purity for our profile CPUs.
[1] https://lists.infradead.org/pipermail/opensbi/2026-January/009307.html
--- target/riscv/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
target/riscv/cpu.c +2 -1
@@ -2955,7 +2955,8 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, char *nodename)#define DEFINE_PROFILE_CPU (type_name, parent_type_name, profile_) \ DEFINE_RISCV_CPU(type_name, parent_type_name, \ - .profile = &(profile_)) + .profile = &(profile_), \ + .cfg.pmp = true)static const TypeInfo riscv_cpu_type_infos[] = { {
Signature · 1 line
2.51.1
Hi,
Please discard this patch. OpenSBI 1.8.1 found a way to go around the issue of a CPU not having PMP enabled.
Thanks,
Daniel
Quoted 38 lines · Daniel Henrique Barboza
The new OpenSBI v1.8 release is not happy about PMP being disabled in the profile CPUs [1], showing a:
init_coldboot: hart isolation configure failed (error -3)error when booting. It seems benign given that it doesn't affect anything else during boot, but still a rather unpleasant message.
We do not have RISC-V profiles that mandates PMP to be enabled. That said, most of our other CPUs enables PMP by default. Setting it to 'on' for profile CPUs allows for a more standard experience between CPUs. And it's not like enabling PMP will bring any additional extensions to the CPU either, meaning that we can still claim a certain level of design purity for our profile CPUs.
[1] https://lists.infradead.org/pipermail/opensbi/2026-January/009307.html
Reported-by Thomas Perrot <[email protected]>Reported-by Anup Patel <[email protected]>Signed-off-by Daniel Henrique Barboza <[email protected]>--- target/riscv/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)target/riscv/cpu.c +2
-1@@ -2955,7 +2955,8 @@ void riscv_isa_write_fdt(RISCVCPU *cpu, void *fdt, char *nodename)#define DEFINE_PROFILE_CPU (type_name, parent_type_name, profile_) \ DEFINE_RISCV_CPU(type_name, parent_type_name, \ - .profile = &(profile_)) + .profile = &(profile_), \ + .cfg.pmp = true)static const TypeInfo riscv_cpu_type_infos[] = { {