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: Use CONFIG_PMP_SLOTS for M-mode stack guard arrays
The arrays `m_mode_pmpaddr_regs` and `m_mode_pmpcfg_regs` within the
`_thread_arch` struct, used for the M-mode stack guard (when
CONFIG_PMP_STACK_GUARD is enabled), were previously sized using the
hardcoded PMP_M_MODE_SLOTS macro (defined as 8).
This commit changes the array sizing to use the Kconfig option
CONFIG_PMP_SLOTS. This option reflects the total number of Physical
Memory Protection (PMP) slots available and configured for the target
hardware.
Using CONFIG_PMP_SLOTS ensures these arrays are dimensioned according
to the system's actual capabilities, providing better flexibility and
correctness over a fixed size.
Signed-off-by: Firas Sammoura <[email protected]>
0 commit comments