[rtems commit] bsps/arm: Fix ARM CP15 opcode for get functions

Sebastian Huber sebh at rtems.org
Thu Sep 5 08:46:22 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Sep  4 14:03:47 2013 +0200

bsps/arm: Fix ARM CP15 opcode for get functions

---

 c/src/lib/libcpu/arm/shared/include/arm-cp15.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libcpu/arm/shared/include/arm-cp15.h b/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
index 0117a5e..3a97a2c 100644
--- a/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
+++ b/c/src/lib/libcpu/arm/shared/include/arm-cp15.h
@@ -586,7 +586,7 @@ static inline uint32_t arm_cp15_get_cache_size_id(void)
 
   __asm__ volatile (
     ARM_SWITCH_TO_ARM
-    "mcr p15, 1, %[val], c0, c0, 0\n"
+    "mrc p15, 1, %[val], c0, c0, 0\n"
      ARM_SWITCH_BACK
     : [val] "=&r" (val) ARM_SWITCH_ADDITIONAL_OUTPUT
   );
@@ -603,7 +603,7 @@ static inline uint32_t arm_cp15_get_cache_level_id(void)
 
   __asm__ volatile (
     ARM_SWITCH_TO_ARM
-    "mcr p15, 1, %[val], c0, c0, 1\n"
+    "mrc p15, 1, %[val], c0, c0, 1\n"
      ARM_SWITCH_BACK
     : [val] "=&r" (val) ARM_SWITCH_ADDITIONAL_OUTPUT
   );
@@ -620,7 +620,7 @@ static inline uint32_t arm_cp15_get_cache_size_selection(void)
 
   __asm__ volatile (
     ARM_SWITCH_TO_ARM
-    "mcr p15, 2, %[val], c0, c0, 0\n"
+    "mrc p15, 2, %[val], c0, c0, 0\n"
      ARM_SWITCH_BACK
     : [val] "=&r" (val) ARM_SWITCH_ADDITIONAL_OUTPUT
   );




More information about the vc mailing list