zephyr/include/linker
Carlo Caione b91d21d32c dt: mpu: Generate MPU regions from DT nodes
Currently the only way for a BOARD/SOC to configure at compile time the
MPU regions is to add, in a soc-specific file, the 'mpu_config' struct
adding static entries for the new regions with the needed attributes
(cacheable, non-cacheable, etc...). This exported struct is then read by
the MPU driver at boot time and used to properly setup the MPU regions.

At the same time it is now possible to introduce new memory regions in
the DT using the newly introduced 'zephyr,memory-region' attribute.

What is missing is the link between these two solutions: that is how to
declare the memory regions in the DT and automatically configure these
regions in the MPU with the correct attributes.

This patch is trying to address exactly this problem.

It is now possible to declare the memory regions in the DT and define
the MPU attributes for the regions using the 'zephyr,memory-region-mpu'
property. When this new property is present together with the
'zephyr,memory-region' property and a the 'zephyr,memory-region'
compatible, the 'mpu_config' struct is automatically extended at
compile-time to host the DT defined regions with the correct MPU
attributes.

So for example in the DT we can now have:

       sram_cache: memory@20200000 {
                compatible = "zephyr,memory-region", "mmio-sram";
                reg = <0x20200000 0x100000>;
                zephyr,memory-region = "SRAM_CACHE";
                zephyr,memory-region-mpu = "RAM";
        };

and a new region will be created called "SRAM_CACHE" and a new MPU
region will be configure at boot time with the attribute
"REGION_RAM_ATTR".

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-04-05 11:16:31 +02:00
..
app_smem_aligned.ld
app_smem_pinned_aligned.ld kernel: app_smem: allowing pinning memory partitions 2021-08-26 21:16:22 -04:00
app_smem_pinned_unaligned.ld kernel: app_smem: allowing pinning memory partitions 2021-08-26 21:16:22 -04:00
app_smem_pinned.ld kernel: app_smem: allowing pinning memory partitions 2021-08-26 21:16:22 -04:00
app_smem_unaligned.ld
app_smem.ld
common-noinit.ld kernel: generate placeholders for kobj tables before final build 2021-04-27 13:32:00 -04:00
common-ram.ld ztest: Update ztest with more powerful testing APIs 2022-01-11 11:47:30 +01:00
common-rom.ld everywhere: fix typos 2022-03-18 13:24:08 -04:00
cplusplus-ram.ld linker: cpp: Fix C++ exception handling info section linking 2021-06-08 11:45:28 -05:00
cplusplus-rom.ld linker: cpp: Fix C++ exception handling info section linking 2021-06-08 11:45:28 -05:00
debug-sections.ld linker: add DWARF-5 debug sections 2021-11-15 14:52:25 -05:00
devicetree_regions.h dt: mpu: Generate MPU regions from DT nodes 2022-04-05 11:16:31 +02:00
devicetree_reserved.h reserved-memory: Fix layering violation 2021-09-28 14:01:36 -04:00
intlist.ld
kobject-data.ld kernel: fix kobj table if having .sdata section. 2021-07-22 07:29:21 -05:00
kobject-priv-stacks.ld everywhere: fix typos 2022-03-18 13:24:08 -04:00
kobject-rom.ld toolchain: arcmwdt: linker: fix placeholders for arcmwdt toolchain 2021-05-20 07:50:38 -05:00
kobject-text.ld linker: clarify CONFIG_KOBJECT_TEXT_AREA too small message 2021-04-20 08:29:22 -04:00
linker-defs.h toolchain: drop the old Z_ prefixed iterables macro 2022-02-28 12:19:15 +01:00
linker-tool-gcc.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
linker-tool-mwdt.h ARC: MWDT: drop LOG2CEIL macro as it's defined now for all toolchains 2021-10-13 17:44:51 -04:00
linker-tool.h
rel-sections.ld
section_tags.h arch: arm: core: aarch32: support for On-Chip Memory (OCM) areas in aarch32 2021-10-28 15:26:50 +02:00
sections.h arch: arm: core: aarch32: support for On-Chip Memory (OCM) areas in aarch32 2021-10-28 15:26:50 +02:00
thread-local-storage.ld
utils.h linker: add a utility func to check if an addr is in RO section 2022-02-28 10:53:02 +01:00