From efbb5490d7799caf70e5bf76a1d0a8b02fcfb9e2 Mon Sep 17 00:00:00 2001 From: bigmagic Date: Thu, 19 Mar 2020 18:31:55 +0800 Subject: add soc timer cntpct --- libcpu/aarch64/cortex-a53/context_gcc.S | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libcpu/aarch64') 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 @@ -25,6 +25,20 @@ rt_hw_set_gtimer_val: MSR CNTP_TVAL_EL0,X0 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 */ -- cgit v1.3.1