Skip to content

Commit

Permalink
refine description of spmp check and exception priority
Browse files Browse the repository at this point in the history
  • Loading branch information
ybc-alkaid committed Oct 13, 2023
1 parent 760f57e commit 5f9afc2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Binary file modified rv-spmp-spec.pdf
Binary file not shown.
4 changes: 3 additions & 1 deletion spmp_spec.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
== S-mode Physical Memory Protection (SPMP)

An optional RISC-V S-mode Physical Memory Protection (SPMP) provides per-hart supervisor-mode control registers to allow physical memory access privileges (read, write, execute) to be specified for each physical memory region.
The SPMP is checked before the PMA and PMP checks, the same as paged virtual memory.
The SPMP is also applied to data accesses in M-mode when the MPRV bit in mstatus is set and the MPP field in mstatus contains S or U.

Like PMP, the granularity of SPMP access control settings is platform-specific and, within a platform, may vary by physical memory region. However, the standard SPMP encoding should support regions as small as four bytes.

SPMP checks can happen in parallel with PMA and PMP.
The SPMP exception reports have higher priority than PMP or PMA exceptions (e.g., an SPMP exception will be raised if the access violates both SPMP and PMP).

SPMP checks will be applied to all accesses for U mode and S mode, depending on the values in the configuration registers.
M-mode accesses are not affected and always pass SPMP permission checks.
SPMP registers can always be modified by M-mode and S-mode software.
Expand Down

0 comments on commit 5f9afc2

Please sign in to comment.