Is your feature request related to a problem? Please describe.
The shareability for tskMPU_REGION_NORMAL_MEMORY ARMv8-ports is portMPU_REGION_NON_SHAREABLE. This setting is not suitable for use with other bus masters, most notably DMA. If a data cache is used, the CPU or DMA might read outdated data from the cache.
Describe the solution you'd like
Add another setting tskMPU_REGION_SHARED_MEMORY which uses portMPU_REGION_OUTER_SHAREABLE.
Describe alternatives you've considered
- Use
tskMPU_REGION_DEVICE_MEMORY, however this would disable the potential use of cache for big data areas and decrease performance.
- Change
tskMPU_REGION_NORMAL_MEMORY to set portMPU_REGION_OUTER_SHAREABLE, which would be a more reasonable default, but could break backwards compatibility (rejected by @aggarg ).
What are your project timelines?
We will locally patch FreeRTOS to use tskMPU_REGION_SHARED_MEMORY until this option becomes available.
Additional context
Discussion: https://forums.freertos.org/t/shareable-mpu-regions-for-dma-on-cortex-m33/24918
Is your feature request related to a problem? Please describe.
The shareability for
tskMPU_REGION_NORMAL_MEMORYARMv8-ports is portMPU_REGION_NON_SHAREABLE. This setting is not suitable for use with other bus masters, most notably DMA. If a data cache is used, the CPU or DMA might read outdated data from the cache.Describe the solution you'd like
Add another setting
tskMPU_REGION_SHARED_MEMORYwhich usesportMPU_REGION_OUTER_SHAREABLE.Describe alternatives you've considered
tskMPU_REGION_DEVICE_MEMORY, however this would disable the potential use of cache for big data areas and decrease performance.tskMPU_REGION_NORMAL_MEMORYto setportMPU_REGION_OUTER_SHAREABLE, which would be a more reasonable default, but could break backwards compatibility (rejected by @aggarg ).What are your project timelines?
We will locally patch FreeRTOS to use
tskMPU_REGION_SHARED_MEMORYuntil this option becomes available.Additional context
Discussion: https://forums.freertos.org/t/shareable-mpu-regions-for-dma-on-cortex-m33/24918