zephyr/arch
Ioannis Glaropoulos 6d789510a5 arch: arm: mpu: introduce option to skip background MPU region fill
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>
2019-11-07 09:41:54 -08:00
..
arc arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
arm arch: arm: mpu: introduce option to skip background MPU region fill 2019-11-07 09:41:54 -08:00
common arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
nios2 arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
posix headers: Refactor kernel and arch headers. 2019-11-06 16:07:32 -08:00
riscv arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
x86 x86: up-level page fault handling 2019-11-07 11:19:38 -05:00
xtensa arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
CMakeLists.txt arch: Simplify private header include path configuration. 2019-11-06 16:07:32 -08:00
Kconfig arch: arm: mpu: introduce option to skip background MPU region fill 2019-11-07 09:41:54 -08:00