Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor arm_mpu to use CMSIS directly #8457

Merged
merged 4 commits into from
Jun 19, 2018

Conversation

ioannisg
Copy link
Member

Initial PR towards implementing #8018.
This PR refactors the ARM MPU implementation to use the CMSIS macro definitions directly.

@ioannisg ioannisg added area: ARM ARM (32-bit) Architecture area: Memory Protection labels Jun 18, 2018
@ioannisg ioannisg requested a review from agross-oss June 18, 2018 15:06
@ioannisg ioannisg requested a review from carlescufi June 18, 2018 15:06
@codecov-io
Copy link

codecov-io commented Jun 18, 2018

Codecov Report

Merging #8457 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8457   +/-   ##
=======================================
  Coverage   64.61%   64.61%           
=======================================
  Files         421      421           
  Lines       40296    40296           
  Branches     6803     6803           
=======================================
  Hits        26037    26037           
  Misses      11126    11126           
  Partials     3133     3133

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 080e32e...3f6372b. Read the comment docs.

@MaureenHelm
Copy link
Member

CI is failing because the beetle doesn't have CMSIS headers. You might be able to fix by defining __MPU_PRESENT for that SoC, but I vaguely remember Vincenzo having some issues with that macro when he originally introduced MPU support into Zephyr.

@ioannisg ioannisg added the DNM This PR should not be merged (Do Not Merge) label Jun 18, 2018
@ioannisg ioannisg removed the DNM This PR should not be merged (Do Not Merge) label Jun 18, 2018
@ioannisg
Copy link
Member Author

@MaureenHelm I added a commit to explicitly define the ARM MPU related macros for Beetle. It looks it is the only arm SOC that does not include CMSIS headers, so this is a straightforward workaround, IMO.

ioannisg added 3 commits June 19, 2018 08:13
This commit removes the macro definitions for MPU_CTRL register
bitmasks, defined in arm_mpu.h, and modifies the MPU driver to
directly use the equivalent macros defined in ARM CMSIS.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the macro definitions for MPU_RBAR register
bitmasks, defined in arm_mpu.h, and modifies the MPU driver to
directly use the equivalent macros defined in ARM CMSIS.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit removes the macro definitions for MPU_RASR register
bitmasks, defined in arm_mpu.h, and modifies the MPU driver to
directly use the equivalent macros defined in ARM CMSIS.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
Duplicate the CMSIS MPU-related macro definitions specifically
for Beetle SOC which is is not compliant with ARM CMSIS and
does not include the ARM CMSIS headers.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
@MaureenHelm MaureenHelm merged commit bf15988 into zephyrproject-rtos:master Jun 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ARM ARM (32-bit) Architecture area: Memory Protection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants