diff options
author | Karel Gardas <karel@functional.vision> | 2023-03-16 14:25:10 +0100 |
---|---|---|
committer | Karel Gardas <karel@functional.vision> | 2023-03-16 15:40:22 +0100 |
commit | 139bc390b508382af4965e26933d114373f136e7 (patch) | |
tree | 8d7084bcb168d1167751cd5b3fc5ce4ca3455b11 /cpukit/score | |
parent | spec: add MPU CTRL option to be usable on ARMV7M based BSPs (diff) | |
download | rtems-139bc390b508382af4965e26933d114373f136e7.tar.bz2 |
score/arm: enhance ARMV7M MPU setup with capability to set control register
Due to API change, the patch also fixes affected BSPs and uses
value provided by MPU CTRL spec option there.
Sponsored-By: Precidata
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/cpu/arm/include/rtems/score/armv7m.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cpukit/score/cpu/arm/include/rtems/score/armv7m.h b/cpukit/score/cpu/arm/include/rtems/score/armv7m.h index 10b3955671..2b1e785cf7 100644 --- a/cpukit/score/cpu/arm/include/rtems/score/armv7m.h +++ b/cpukit/score/cpu/arm/include/rtems/score/armv7m.h @@ -691,6 +691,7 @@ static inline void _ARMV7M_MPU_Disable_region( } static inline void _ARMV7M_MPU_Setup( + uint32_t ctrl, const ARMV7M_MPU_Region_config *cfg, size_t cfg_count ) @@ -726,7 +727,7 @@ static inline void _ARMV7M_MPU_Setup( _ARMV7M_MPU_Disable_region(mpu, region); } - mpu->ctrl = ARMV7M_MPU_CTRL_ENABLE | ARMV7M_MPU_CTRL_PRIVDEFENA; + mpu->ctrl = ctrl; scb->shcsr |= ARMV7M_SCB_SHCSR_MEMFAULTENA; _ARM_Data_synchronization_barrier(); |