qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Extend and configure PMP region count
@ 2025-06-06  7:25 Jay Chang
  2025-06-06  7:25 ` [PATCH v5 1/2] target/riscv: Extend PMP region up to 64 Jay Chang
  2025-06-06  7:25 ` [PATCH v5 2/2] target/riscv: Make PMP region count configurable Jay Chang
  0 siblings, 2 replies; 5+ messages in thread
From: Jay Chang @ 2025-06-06  7:25 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
	Daniel Henrique Barboza, Liu Zhiwei, Jay Chang

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:
  V5:
  * Dropped all pmp_regions = 8 overrides except SiFive-specific cases,
    and every other vendor CPU should set its own default if they want.
    (based on feedback from Daniel)

Jay Chang (2):
  target/riscv: Extend PMP region up to 64
  target/riscv: Make PMP region count configurable

 target/riscv/cpu.c                |  48 ++++++++++-
 target/riscv/cpu.h                |   3 +-
 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, 256 insertions(+), 16 deletions(-)

-- 
2.48.1



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-09  3:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-06  7:25 [PATCH v5 0/2] Extend and configure PMP region count Jay Chang
2025-06-06  7:25 ` [PATCH v5 1/2] target/riscv: Extend PMP region up to 64 Jay Chang
2025-06-06  7:25 ` [PATCH v5 2/2] target/riscv: Make PMP region count configurable Jay Chang
2025-06-09  2:47   ` Alistair Francis
2025-06-09  3:05   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).