[rtems commit] bsps/arm: Move some MMU bit settings

Sebastian Huber sebh at rtems.org
Sun Oct 27 18:00:08 UTC 2013


Module:    rtems
Branch:    master
Commit:    09d0c96b915cbc09625860985c7846f67885bacc
Changeset: http://git.rtems.org/rtems/commit/?id=09d0c96b915cbc09625860985c7846f67885bacc

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Sun Oct 27 18:58:42 2013 +0100

bsps/arm: Move some MMU bit settings

The function
arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache() must
only set the MMU and cache enable flags.  Configuration flags must be
set elsewhere.

---

 .../lib/libbsp/arm/shared/include/arm-cp15-start.h |    3 +--
 c/src/lib/libbsp/arm/shared/mminit.c               |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
index b5d5de8..dafad80 100644
--- a/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
+++ b/c/src/lib/libbsp/arm/shared/include/arm-cp15-start.h
@@ -100,8 +100,7 @@ arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
   }
 
   /* Enable MMU and cache */
-  ctrl |= ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_S | ARM_CP15_CTRL_I |
-          ARM_CP15_CTRL_C | ARM_CP15_CTRL_M  | ARM_CP15_CTRL_XP;
+  ctrl |= ARM_CP15_CTRL_I | ARM_CP15_CTRL_C | ARM_CP15_CTRL_M;
 
   arm_cp15_set_control(ctrl);
 }
diff --git a/c/src/lib/libbsp/arm/shared/mminit.c b/c/src/lib/libbsp/arm/shared/mminit.c
index 23e71e6..5a4240c 100644
--- a/c/src/lib/libbsp/arm/shared/mminit.c
+++ b/c/src/lib/libbsp/arm/shared/mminit.c
@@ -14,6 +14,8 @@ BSP_START_TEXT_SECTION void bsp_memory_management_initialize(void)
 {
   uint32_t ctrl = arm_cp15_get_control();
 
+  ctrl |= ARM_CP15_CTRL_AFE | ARM_CP15_CTRL_S | ARM_CP15_CTRL_XP;
+
   arm_cp15_start_setup_translation_table_and_enable_mmu_and_cache(
     ctrl,
     (uint32_t *) bsp_translation_table_base,




More information about the vc mailing list