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
arch/riscv: Add API to control write permission for custom PMP entry
Implement the `riscv_pmp_set_write_permission()` API, which allows the
'W' bit in the PMP configuration register (pmpcfg) to be dynamically
enabled or disabled for a memory region defined by
CUSTOM_PMP_ENTRY_START and CUSTOM_PMP_ENTRY_SIZE.
This functionality is crucial for security platforms to protect critical
flash areas, such as rollback data, against accidental or malicious
writes.
Also adds the Kconfig symbol `PLATFORM_EC_ROLLBACK_PMP_PROTECT` which
depends on `RISCV_PMP` and ensures `CUSTOM_PMP_ENTRY` is selected when
rollback protection is desired. The current implementation is limited to
PMP slots 0-7.
Signed-off-by: Firas Sammoura <[email protected]>
0 commit comments