[PATCH] Correct system register for virtual timer value

Kinsey Moore nyphbl8d at gmail.com
Thu Feb 21 22:13:58 UTC 2019


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.
---
 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 54a8e7516c..a7e7542bcb 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
   );
-- 
2.11.0



More information about the devel mailing list