zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.93k stars 6.65k forks source link

STM32H7: Support memory protection unit(MPU) to enable shared memory #35663

Closed jyeons closed 3 years ago

jyeons commented 3 years ago

Hi, I am currently working with STM32H747 disco board which is a dual core soc.

Is your feature request related to a problem? Please describe. The two processors in the board has sram4 as a shared memory. By default, the memory region is protected by memory protection unit(MPU), which I found the related information is somehow not easily accessible. The accesses to the shared memory without configuring the sram4 to be shareable will not be denied either not warned.

Describe the solution you'd like

  1. A basic API to configure memory protection unit.
  2. Example application of the shared memory with the proper MPU configuration in the Zephyr environment.

Describe alternatives you've considered A note to inform the default memory protection to the shared memory of STM32H747.

Additional context The shared memory is a fundamental hardware component when it comes to using OpenAMP for this dual-core system. In the OpenAMP examples, there was no MPU configuration for the other target boards. I missed this part completely. If MPU is applied to the boards with OpenAMP examples, adding some extra information about MPU would improve the example very much.

Thank you!

github-actions[bot] commented 3 years ago

This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time.