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. change log: V2: * Rebase on riscv-to-apply.next Jay Chang (2): target/riscv: Extend PMP region up to 64 target/riscv: Make PMP region count configurable target/riscv/cpu.c | 54 ++++++++++++- target/riscv/cpu.h | 2 +- target/riscv/cpu_bits.h | 60 ++++++++++++++ target/riscv/cpu_cfg_fields.h.inc | 1 + target/riscv/csr.c | 129 +++++++++++++++++++++++++++++- target/riscv/machine.c | 3 +- target/riscv/pmp.c | 28 ++++--- 7 files changed, 261 insertions(+), 16 deletions(-) -- 2.48.1