Skip to content

Extend and configure PMP region count

Jay Chang qemu-devel qemu-riscv 5 versions – Applied

Status from this message: Applied to riscv-to-apply.next

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest2 patches 2 repliesApplied
  2. v42 patches 5 repliesApplied
  3. v32 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches2 repliesSuperseded
v12 patches5 repliesSuperseded

Changes in v5 from the cover letter

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

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/2target/riscv: Extend PMP region up to 64target/riscv/cpu_bits.h target/riscv/csr.c+182 -20 replies
2/2target/riscv: Make PMP region count configurabletarget/riscv/cpu.c target/riscv/cpu.h target/riscv/cpu_cfg_fields.h.inc +3 more+74 -142 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchFrank ChangAlistair FrancisDaniel Henrique Barboza
1/2R-b R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [PATCH v5 0/2] Extend and configure PMP region count

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(-)
Signature · 1 line
2.48.1