Skip to content

[Feature Request] Make shareability attribute configurable #1383

@neuschwander-lmi

Description

@neuschwander-lmi

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions