CONFIG_MPU_GAP_FILLING

Force MPU to be filling in background memory regions

Type: bool

Help

This Kconfig option instructs the MPU driver to enforce
a full kernel SRAM partitioning, when it programs the
dynamic MPU regions (user thread stack, PRIV stack guard
and application memory domains) during context-switch. We
allow this to be a configurable option, in order to be able
to switch the option off and have an increased number of MPU
regions available for application memory domain programming.

Notes:
An increased number of MPU regions should only be required,
when building with USERSPACE support. As a result, when we
build without USERSPACE support, gap filling should always
be required.

When the option is switched off, access to memory areas not
covered by explicit MPU regions is restricted to privileged
code on an ARCH-specific basis. Refer to ARCH-specific
documentation for more information on how this option is
used.

Direct dependencies

MPU_REQUIRES_NON_OVERLAPPING_REGIONS && MPU

(Includes any dependencies from ifs and menus.)

Default

Kconfig definition

At <Zephyr>/arch/Kconfig:785

Included via <Zephyr>/Kconfig:8<Zephyr>/Kconfig.zephyr:39

Menu path: (Top) → Enable MPU features

config MPU_GAP_FILLING
    bool "Force MPU to be filling in background memory regions"
    default y if !USERSPACE
    depends on MPU_REQUIRES_NON_OVERLAPPING_REGIONS && MPU
    help
      This Kconfig option instructs the MPU driver to enforce
      a full kernel SRAM partitioning, when it programs the
      dynamic MPU regions (user thread stack, PRIV stack guard
      and application memory domains) during context-switch. We
      allow this to be a configurable option, in order to be able
      to switch the option off and have an increased number of MPU
      regions available for application memory domain programming.

      Notes:
      An increased number of MPU regions should only be required,
      when building with USERSPACE support. As a result, when we
      build without USERSPACE support, gap filling should always
      be required.

      When the option is switched off, access to memory areas not
      covered by explicit MPU regions is restricted to privileged
      code on an ARCH-specific basis. Refer to ARCH-specific
      documentation for more information on how this option is
      used.

(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)