[rtems commit] bsps/arm: Fix system register for virtual timer

Sebastian Huber sebh at rtems.org
Fri Feb 22 07:29:49 UTC 2019


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

Author:    Kinsey Moore <nyphbl8d at gmail.com>
Date:      Thu Feb 21 16:13:58 2019 -0600

bsps/arm: Fix system register for virtual timer

The system register in use for retrieval of the virtual timer value was
mistakenly copied from the physical timer value retrieval function.
Virtual timer value retrieval should use the same system register as the
virtual timer value setter.

Close #3699.

---

 cpukit/score/cpu/arm/include/libcpu/arm-cp15.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/score/cpu/arm/include/libcpu/arm-cp15.h b/cpukit/score/cpu/arm/include/libcpu/arm-cp15.h
index 54a8e75..a7e7542 100644
--- a/cpukit/score/cpu/arm/include/libcpu/arm-cp15.h
+++ b/cpukit/score/cpu/arm/include/libcpu/arm-cp15.h
@@ -2067,7 +2067,7 @@ arm_cp15_get_counter_pl1_virtual_timer_value(void)
 
   __asm__ volatile (
     ARM_SWITCH_TO_ARM
-    "mrc p15, 0, %[val], c14, c2, 0\n"
+    "mrc p15, 0, %[val], c14, c3, 0\n"
     ARM_SWITCH_BACK
     : [val] "=&r" (val) ARM_SWITCH_ADDITIONAL_OUTPUT
   );




More information about the vc mailing list