The latest development version of this page may be more current than this released 2.7.5 version.

CONFIG_SRAM_REGION_PERMISSIONS

Assign appropriate permissions to kernel areas in SRAM

Type: bool

Help

This option indicates that memory protection hardware
is present, enabled, and regions have been configured at boot for memory
ranges within the kernel image.

If this option is turned on, certain areas of the kernel image will
have the following access policies applied for all threads, including
supervisor threads:

1) All program text will be have read-only, execute memory permission
2) All read-only data will have read-only permission, and execution
   disabled if the hardware supports it.
3) All other RAM addresses will have read-write permission, and
   execution disabled if the hardware supports it.

Options such as USERSPACE or HW_STACK_PROTECTION may additionally
impose additional policies on the memory map, which may be global
or local to the current running thread.

This option may consume additional memory to satisfy memory protection
hardware alignment constraints.

If this option is disabled, the entire kernel will have default memory
access permissions set, typically read/write/execute. It may be desirable
to turn this off on MMU systems which are using the MMU for demand
paging, do not need memory protection, and would rather not use up
RAM for the alignment between regions.

Direct dependencies

MMU || MPU

(Includes any dependencies from ifs and menus.)

Default

  • y

Symbols that select this symbol

Kconfig definition

At arch/Kconfig:811

Included via Kconfig:8Kconfig.zephyr:39

Menu path: (Top)

config SRAM_REGION_PERMISSIONS
    bool "Assign appropriate permissions to kernel areas in SRAM"
    default y
    depends on MMU || MPU
    help
      This option indicates that memory protection hardware
      is present, enabled, and regions have been configured at boot for memory
      ranges within the kernel image.

      If this option is turned on, certain areas of the kernel image will
      have the following access policies applied for all threads, including
      supervisor threads:

      1) All program text will be have read-only, execute memory permission
      2) All read-only data will have read-only permission, and execution
         disabled if the hardware supports it.
      3) All other RAM addresses will have read-write permission, and
         execution disabled if the hardware supports it.

      Options such as USERSPACE or HW_STACK_PROTECTION may additionally
      impose additional policies on the memory map, which may be global
      or local to the current running thread.

      This option may consume additional memory to satisfy memory protection
      hardware alignment constraints.

      If this option is disabled, the entire kernel will have default memory
      access permissions set, typically read/write/execute. It may be desirable
      to turn this off on MMU systems which are using the MMU for demand
      paging, do not need memory protection, and would rather not use up
      RAM for the alignment between regions.

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