6d789510a5
We introduce MPU_GAP_FILLING Kconfig option that instructs the MPU driver to enforce a full SRAM partitioning, when it programs the dynamic MPU regions (user thread stack, PRIV stack guard and application memory domains) at context-switch. We allow this to be configurable, in order to increase the number of MPU regions available for application memory domain programming. This option is introduced in arch/Kconfig, as it is expected to serve as a cross-ARCH symbol. The option can be set by the user during build configuration. By not enforcing full partition, we may leave part of kernel SRAM area covered only by the default ARM memory map. This is fine for User Mode, since the background ARM map does not allow nPRIV access at all. The difference is that kernel code will be able to attempt fetching instructions from kernel SRAM area without this leading directly to a MemManage exception. Since this does not compromize User Mode, we make the skipping of full partitioning the default behavior for the ARMv8-M MPU driver. The application developer may be able to overwrite this. In the wake of this change we update the macro definitions in arm_core_mpu_dev.h that derive the maximum number of MPU regions for application memory domains. Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no> |
||
---|---|---|
.. | ||
arc | ||
arm | ||
common | ||
nios2 | ||
posix | ||
riscv | ||
x86 | ||
xtensa | ||
CMakeLists.txt | ||
Kconfig |