You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The PMP configuration must be performed with M-mode privileges to ensure
PMP CSRs (Control and Status Registers) can be correctly accessed and
written.
Firmwares that utilize multi-stage or memory-relocating boot sequences
(e.g., jumping between Read-Only and Read-Write images) might enter the
kernel with a non-default `mstatus` configuration left over from the
previous execution environment.
This commit ensures that the necessary M-mode privilege state is
asserted before PMP registers are initialized, guaranteeing consistency
and correctness in the hardware protection setup by clearing the
`MSTATUS_MPRV` and setting the `MSTATUS_MPP` bits.
Signed-off-by: Firas Sammoura <[email protected]>
0 commit comments