diff --git a/arch/arm64/core/reset.c b/arch/arm64/core/reset.c index 2c5372f6b84..e92efa27434 100644 --- a/arch/arm64/core/reset.c +++ b/arch/arm64/core/reset.c @@ -129,7 +129,11 @@ void z_arm64_el2_init(void) zero_cntvoff_el2(); /* Set 64-bit virtual timer offset to 0 */ zero_cnthctl_el2(); +#ifdef CONFIG_CPU_AARCH64_CORTEX_R + zero_cnthps_ctl_el2(); +#else zero_cnthp_ctl_el2(); +#endif /* * Enable this if/when we use the hypervisor timer. * write_cnthp_cval_el2(~(uint64_t)0); diff --git a/include/arch/arm64/lib_helpers.h b/include/arch/arm64/lib_helpers.h index 23ac8a0f1db..e03c0db039d 100644 --- a/include/arch/arm64/lib_helpers.h +++ b/include/arch/arm64/lib_helpers.h @@ -56,6 +56,7 @@ MAKE_REG_HELPER(cntfrq_el0); MAKE_REG_HELPER(cnthctl_el2); MAKE_REG_HELPER(cnthp_ctl_el2); +MAKE_REG_HELPER(cnthps_ctl_el2); MAKE_REG_HELPER(cntv_ctl_el0) MAKE_REG_HELPER(cntv_cval_el0) MAKE_REG_HELPER(cntvct_el0);