summaryrefslogtreecommitdiff
path: root/libcpu/aarch64/cortex-a
diff options
context:
space:
mode:
authorShell <[email protected]>2024-07-17 09:39:54 +0800
committerGitHub <[email protected]>2024-07-17 09:39:54 +0800
commitf6f570df742e8f03fb696ea036987b4d48a542c4 (patch)
treed5e6c7a6c4d75b0fbb03f8ff4b3c02ccacddf5ec /libcpu/aarch64/cortex-a
parent65ffe4e13ef52d007d83c93467871c529705b522 (diff)
parent4ad194bb47101345ce3b3fa631ab2215a0c190c0 (diff)
Merge branch 'master' into shell/rv64-tick
Diffstat (limited to 'libcpu/aarch64/cortex-a')
-rw-r--r--libcpu/aarch64/cortex-a/entry_point.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/libcpu/aarch64/cortex-a/entry_point.S b/libcpu/aarch64/cortex-a/entry_point.S
index 315e331aac..c0acacb2ca 100644
--- a/libcpu/aarch64/cortex-a/entry_point.S
+++ b/libcpu/aarch64/cortex-a/entry_point.S
@@ -234,6 +234,10 @@ init_cpu_el:
bic x0, x0, #(1 << 1) /* Disable Alignment check */
msr sctlr_el1, x0
+ mrs x0, cntkctl_el1
+ orr x0, x0, #(1 << 1) /* Set EL0VCTEN, enabling the EL0 Virtual Count Timer */
+ msr cntkctl_el1, x0
+
/* Avoid trap from SIMD or float point instruction */
mov x0, #0x00300000 /* Don't trap any SIMD/FP instructions in both EL0 and EL1 */
msr cpacr_el1, x0