X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/cb3231590a3c94ab4375e2228bd5e86b0cf1ad7e..f427ee49d309d8fc33ebf3042c3a775f2f530ded:/libsyscall/wrappers/mach_continuous_time.c diff --git a/libsyscall/wrappers/mach_continuous_time.c b/libsyscall/wrappers/mach_continuous_time.c index c128ac1b7..e07aba3bf 100644 --- a/libsyscall/wrappers/mach_continuous_time.c +++ b/libsyscall/wrappers/mach_continuous_time.c @@ -62,8 +62,9 @@ _mach_continuous_hwclock(uint64_t *cont_time __unused) #define ISB_SY 0xf uint8_t cont_hwclock = *((uint8_t*)_COMM_PAGE_CONT_HWCLOCK); if (cont_hwclock) { + volatile uint64_t *base_ptr = (volatile uint64_t*)_COMM_PAGE_CONT_HW_TIMEBASE; __builtin_arm_isb(ISB_SY); - *cont_time = __builtin_arm_rsr64("CNTPCT_EL0"); + *cont_time = __builtin_arm_rsr64("CNTVCT_EL0") + *base_ptr; return KERN_SUCCESS; } #endif