zephyr/soc
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
..
arc ARC: QEMU: Add the second UART support 2022-03-24 08:27:40 -04:00
arm dt: mpu: Generate MPU regions from DT nodes 2022-04-05 11:16:31 +02:00
arm64 nxp: imx: support i.MX8MP EVK board 2022-03-14 11:28:35 +01:00
mips soc: mips: add Qemu Malta support 2022-01-19 13:48:21 -05:00
nios2
posix posix: Select CPU_HAS_FPU for POSIX arch 2022-03-24 10:44:38 +01:00
riscv it8xxx2: re-factor idle routine 2022-04-01 12:49:09 -05:00
sparc
x86 everywhere: fix typos 2022-03-18 13:24:08 -04:00
xtensa util: convert wait_for macro to uppercase 2022-04-04 09:50:28 -05:00
Kconfig kconfig: soc and shield cleanup 2021-06-11 16:13:22 +02:00