summaryrefslogtreecommitdiff
path: root/libcpu/aarch64
diff options
context:
space:
mode:
authorbigmagic <[email protected]>2020-03-19 18:31:55 +0800
committerbigmagic <[email protected]>2020-04-03 20:18:18 +0800
commitefbb5490d7799caf70e5bf76a1d0a8b02fcfb9e2 (patch)
tree22e14215d32d6f42eeb93e94a6dec74ab32e2c49 /libcpu/aarch64
parent0f57faa591b4eb9cf8ec88bb092855369a71d19a (diff)
add soc timer cntpct
Diffstat (limited to 'libcpu/aarch64')
-rw-r--r--libcpu/aarch64/cortex-a53/context_gcc.S14
1 files changed, 14 insertions, 0 deletions
diff --git a/libcpu/aarch64/cortex-a53/context_gcc.S b/libcpu/aarch64/cortex-a53/context_gcc.S
index d5c241036e..934db7ed84 100644
--- a/libcpu/aarch64/cortex-a53/context_gcc.S
+++ b/libcpu/aarch64/cortex-a53/context_gcc.S
@@ -26,6 +26,20 @@ rt_hw_set_gtimer_val:
RET
/*
+ *get gtimer CNTP_TVAL_EL0 value
+ */
+.globl rt_hw_get_gtimer_val
+rt_hw_get_gtimer_val:
+ MRS X0,CNTP_TVAL_EL0
+ RET
+
+
+.globl rt_hw_get_cntpct_val
+rt_hw_get_cntpct_val:
+ MRS X0, CNTPCT_EL0
+ RET
+
+/*
*get gtimer frq value
*/
.globl rt_hw_get_gtimer_frq