qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Extend and configure PMP region count
@ 2025-04-21  9:46 Jay Chang
  2025-04-21  9:46 ` [PATCH 1/2] target/riscv: Extend PMP region up to 64 Jay Chang
  2025-04-21  9:46 ` [PATCH 2/2] target/riscv: Make PMP region count configurable Jay Chang
  0 siblings, 2 replies; 8+ messages in thread
From: Jay Chang @ 2025-04-21  9:46 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.

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



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

end of thread, other threads:[~2025-04-25  9:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-21  9:46 [PATCH 0/2] Extend and configure PMP region count Jay Chang
2025-04-21  9:46 ` [PATCH 1/2] target/riscv: Extend PMP region up to 64 Jay Chang
2025-04-23 11:22   ` Daniel Henrique Barboza
2025-04-24 10:53   ` Alistair Francis
2025-04-21  9:46 ` [PATCH 2/2] target/riscv: Make PMP region count configurable Jay Chang
2025-04-23 11:30   ` Daniel Henrique Barboza
2025-04-24 10:55   ` Alistair Francis
2025-04-25  9:43     ` Jay Chang

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).