The first patch extends the number of PMP regions supported up to 64, following the RISC-V Privileged Specification (version >1.12), where RV32 can have up to 64 PMP regions configured through 16 CSRs.
The second patch makes the PMP region count configurable via a new CPU parameter `num-pmp-regions`. This allows platforms to adjust the number of PMP regions without relying on a fixed default value. If unspecified, the default remains 16 to preserve compatibility. Jay Chang (2): target/riscv: Extend PMP region up to 64 target/riscv: Make PMP region count configurable target/riscv/cpu.c | 46 ++++++++++++++ target/riscv/cpu.h | 2 +- target/riscv/cpu_bits.h | 60 +++++++++++++++++++ target/riscv/cpu_cfg.h | 1 + target/riscv/csr.c | 129 +++++++++++++++++++++++++++++++++++++++- target/riscv/machine.c | 3 +- target/riscv/pmp.c | 28 ++++++--- 7 files changed, 255 insertions(+), 14 deletions(-) -- 2.48.1