7483e43f0c
The 'zephyr,memory-region-mpu' property was addede gqas a convenient way to create and configure MPU regions using information coming from DT. It has been used a lot since it was introduced so I guess we can consider it a Zephyr success story ™ . Unfortunately it has been proved to be a bit limited and with some important limitations: 1. It was introduced as a property of the compatible zephyr,memory-region that is used to create linker regions and sections from DT data. This means that we can actually create MPU regions only for DT-defined regions and sections. 2. The naming is unfortunate because it is implying that it is used only for MPU. 3. It is misplaced being in include/zephyr/linker/devicetree_regions.h and still it has nothing to do with the linker at all. 4. It is exporting a function called LINKER_DT_REGION_MPU that again has nothing to do with the linker. Point (1) is also particularly limiting because it is preventing us to characterize memory regions that are not generated using the 'zephyr,memory-region' compatible, like generic mmio-sram regions. While we fix all the issues, we also want to extend a bit the range of usefulness of this property. We are renaming it 'zephyr,memory-attr' and it is now carrying information about the type of memory the property is attached to (cacheable, non-cacheable, IO, eXecutable, etc...). The user can use this property and the DT API coming with it to act on the memory node it is accompanied by. We are still providing the DT_MEMORY_ATTR_APPLY() macro that can be used to create the MPU regions as before, but we are adding also a DT_MEMORY_ATTR_FOREACH_NODE() macro that can be used to cycle through the memory nodes and act on those. Signed-off-by: Carlo Caione <ccaione@baylibre.com> |
||
---|---|---|
.. | ||
api | ||
api-usage.rst | ||
bindings-intro.rst | ||
bindings-syntax.rst | ||
bindings-upstream.rst | ||
bindings.rst | ||
design.rst | ||
dt-vs-kconfig.rst | ||
howtos.rst | ||
index.rst | ||
intro-input-output.rst | ||
intro-scope-purpose.rst | ||
intro-syntax-structure.rst | ||
intro.rst | ||
macros.bnf | ||
main-example.dts | ||
phandles.rst | ||
troubleshooting.rst | ||
zephyr-user-node.rst | ||
zephyr_dt_build_flow.png | ||
zephyr_dt_build_flow.svg | ||
zephyr_dt_i2c_example.png | ||
zephyr_dt_i2c_example.svg | ||
zephyr_dt_i2c_high_level.png | ||
zephyr_dt_i2c_high_level.svg | ||
zephyr_dt_inputs_outputs.svg |