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

Arch arm v8m mpu remove hal #8467

Merged

Conversation

ioannisg
Copy link
Member

@ioannisg ioannisg commented Jun 19, 2018

This pull request refactors the arm_mpu.h header, as part of the preparations for adding support for ARMv8-M MPU (#8018 ). Contains the following:

  • removal of the redundant MPU HAL definition in arm_mpu.h and use of the CMSIS MPU HAL API directly
  • adding the HAL API explicitly for beetle (which does not include CMSIS)
  • use the CMSIS Bitsets and flags in defines present in arm_mpu.h
  • move the ARMv7-M specific defines and convenience macros in a new file, arm_mpu_v7m.h.

The PR does not change the current functionality.
Advice to review commit by commit.

Super-set of #8603 (rebased over #8603)

@ioannisg ioannisg added the DNM This PR should not be merged (Do Not Merge) label Jun 19, 2018
@codecov-io
Copy link

codecov-io commented Jun 19, 2018

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #8467   +/-   ##
=======================================
  Coverage   52.35%   52.35%           
=======================================
  Files         195      195           
  Lines       24694    24694           
  Branches     5128     5128           
=======================================
  Hits        12929    12929           
  Misses       9695     9695           
  Partials     2070     2070

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 347f9a0...960de32. Read the comment docs.

@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch 2 times, most recently from cd401ce to c70a67a Compare June 19, 2018 12:41
@ioannisg ioannisg removed the DNM This PR should not be merged (Do Not Merge) label Jun 19, 2018
@ioannisg ioannisg requested a review from nashif June 19, 2018 14:51
@ioannisg ioannisg assigned carlescufi and unassigned carlescufi Jun 19, 2018
@ioannisg ioannisg requested a review from carlescufi June 19, 2018 14:51
@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch from c70a67a to 624e8cf Compare June 19, 2018 21:23
@nashif nashif added the DNM This PR should not be merged (Do Not Merge) label Jun 19, 2018
@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch 2 times, most recently from d79ee82 to 6303405 Compare June 23, 2018 17:37
@ioannisg ioannisg removed the DNM This PR should not be merged (Do Not Merge) label Jun 23, 2018
@ioannisg ioannisg requested a review from agross-oss June 23, 2018 17:38
@ioannisg ioannisg added area: ARM ARM (32-bit) Architecture area: Memory Protection labels Jun 23, 2018
@ioannisg ioannisg requested a review from andrewboie June 23, 2018 17:43
@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch 4 times, most recently from 3cedcde to 13c4dff Compare June 25, 2018 11:56
@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch 3 times, most recently from bf31ddb to dd6451f Compare June 29, 2018 06:29
@ioannisg ioannisg requested a review from pizi-nordic June 29, 2018 07:04
@carlescufi
Copy link
Member

Looks good to me @ioannisg. Will let others approve though.

@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch 2 times, most recently from d6138bb to 812fa08 Compare July 2, 2018 21:33
@nashif nashif force-pushed the arch_arm_v8m_mpu_remove_hal branch from 812fa08 to 33aeb07 Compare July 3, 2018 21:14
ioannisg added 4 commits July 3, 2018 23:31
This commit removes the redundant HAL definition for the ARM
Cortex-M MPU registers, and modifies the ARM MPU driver
implementation to directly use the provided HAL from CMSIS.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit modifies the interal macro defitions for MPU region
attributes in arm_mpu.h to use bitset flags directly from CMSIS.

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

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit moves the macro definitions and convenience wrappers
for ARM MPU that are specific to ARMv6-m, and ARMv7-m to an
arch-specific MPU header file. It leaves only the generic
content in arm_mpu.h, i.e. the content that is supposed to
be common for ARMv8-M MPU.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
@ioannisg ioannisg force-pushed the arch_arm_v8m_mpu_remove_hal branch from 33aeb07 to 960de32 Compare July 3, 2018 21:31
@nashif nashif merged commit ca6b21b into zephyrproject-rtos:master Jul 3, 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.

6 participants