zephyr/include
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_memory include: app_memory: mem_domain: fixup single typo 2022-03-29 10:29:34 -05:00
arch toolchain: generalize the Z_IS_POW2 macro 2022-03-24 10:44:38 +01:00
audio audio: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
bluetooth Bluetooth: Host: Make bt_eatt_count public 2022-04-04 14:22:22 +02:00
canbus everywhere: fix typos 2022-03-18 13:24:08 -04:00
console drivers: console: remove @return doc for void functions 2022-01-12 16:02:16 -05:00
crypto everywhere: fix typos 2022-03-18 13:24:08 -04:00
data everywhere: fix typos 2022-03-14 20:22:24 -04:00
debug everywhere: fix typos 2022-03-14 20:22:24 -04:00
devicetree devicetree: deprecate DT_CHOSEN_ZEPHYR_FLASH_CONTROLLER_LABEL 2022-03-31 13:55:10 +02:00
dfu
display cfb: introduce invert area function 2022-03-31 11:58:29 -05:00
drivers drivers: spi: Fix SPI_DT_SPEC initializer for XCC toolchain 2022-04-04 14:40:19 -07:00
dt-bindings dts: pwm : flag to enable a complementary output of a stm32 pwm channel 2022-03-31 10:28:47 +02:00
fs everywhere: fix typos 2022-03-18 13:24:08 -04:00
ipc ipc_service: Extend API with nocopy functions 2022-04-01 09:05:06 -05:00
kernel kernel: Add "per thread" timeslice mechanism 2022-03-09 13:49:44 -05:00
linker dt: mpu: Generate MPU regions from DT nodes 2022-04-05 11:16:31 +02:00
logging logging: v2: add kconfig to always add indexes to msg packages 2022-04-01 13:29:45 +02:00
lorawan lorawan: allow setting of DevNonce for OTAA re-join 2022-03-19 14:29:01 -04:00
math math: introduce macro for integer log2 2022-01-11 16:10:53 -05:00
mgmt include: mgmt: fixup typos in hawkbit 2022-03-23 10:58:41 -04:00
modbus modbus: stop bits can now be set individually in client mode 2022-03-24 08:23:17 -04:00
multi_heap
net drivers: net: loopback: Add interface to simulate packet drop 2022-04-01 12:36:14 -05:00
pm pm: device: move pm_device_runtime_init_* funcs 2022-03-25 10:39:55 +01:00
portability
posix net: sockets: Implement getpeername() function 2022-03-16 16:23:16 +01:00
random
settings everywhere: fix typos 2022-03-14 20:22:24 -04:00
shell Shell: String to numeric conversion utils 2022-04-05 09:21:52 +02:00
stats stats: i2c: I2C stats 2021-12-04 07:22:56 -05:00
storage storage/flash_map: Use larger type for alignment 2021-12-30 16:32:02 -05:00
sys util: convert wait_for macro to uppercase 2022-04-04 09:50:28 -05:00
task_wdt
timing
toolchain toolchain: Override __INTN_C macros to match Zephyr stdint types 2022-03-29 12:34:08 -07:00
tracing everywhere: fix typos 2022-03-14 20:22:24 -04:00
usb usb: hid: Fix USB HID Doxygen doc 2022-04-04 09:43:30 -05:00
xen everywhere: fix typos 2022-03-18 13:24:08 -04:00
zephyr everywhere: fix typos 2022-03-14 20:22:24 -04:00
cache.h
device.h device: improve (z_)device_is_ready docs 2022-01-07 10:41:23 -05:00
devicetree.h devicetree: fix DT_STRING_UPPER_TOKEN docstring 2022-03-26 12:14:48 +01:00
exc_handle.h
fatal.h fatal: fix missing extern "C" 2021-12-14 11:47:13 -06:00
init.h
irq_nextlevel.h drivers: interrupt_controller: remove @return doc for void funcs 2022-01-12 16:02:16 -05:00
irq_offload.h arch: Add IRQ_OFFSET_NESTED feature 2022-02-21 22:10:03 -05:00
irq.h drivers: interrupt_controller: remove @return doc for void funcs 2022-01-12 16:02:16 -05:00
kernel_includes.h
kernel_structs.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
kernel_version.h
kernel.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
shared_irq.h
smf.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
spinlock.h doc: spinlock: ensure spinlock api is added to doxygen 2022-02-02 08:57:14 -05:00
sw_isr_table.h
sys_clock.h everywhere: fix typos 2022-03-14 20:22:24 -04:00
syscall_handler.h
syscall.h
timeout_q.h
toolchain.h toolchain: introduce macro TOOLCHAIN_HAS_C_AUTO_TYPE 2022-02-28 10:52:51 +01:00
wait_q.h
zephyr.h