X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/c910b4d9d2451126ae3917b931cd4390c11e1d52..4d15aeb193b2c68f1d38666c317f8d3734f5f083:/osfmk/i386/tsc.h?ds=sidebyside diff --git a/osfmk/i386/tsc.h b/osfmk/i386/tsc.h index e702ec234..1d084859b 100644 --- a/osfmk/i386/tsc.h +++ b/osfmk/i386/tsc.h @@ -40,9 +40,12 @@ #ifndef _I386_TSC_H_ #define _I386_TSC_H_ -#define BASE_NHM_CLOCK_SOURCE 139806638ULL +#define BASE_NHM_CLOCK_SOURCE 133333333ULL +#define BASE_ART_CLOCK_SOURCE 24000000ULL /* 24Mhz */ #define IA32_PERF_STS 0x198 +#define SLOW_TSC_THRESHOLD 1000067800 /* if slower, nonzero shift required in nanotime() algorithm */ +#ifndef ASSEMBLER extern uint64_t busFCvtt2n; extern uint64_t busFCvtn2t; extern uint64_t tscFreq; @@ -54,6 +57,7 @@ extern uint64_t busFreq; extern uint32_t flex_ratio; extern uint32_t flex_ratio_min; extern uint32_t flex_ratio_max; +extern uint64_t tsc_at_boot; struct tscInfo { @@ -74,6 +78,6 @@ typedef struct tscInfo tscInfo_t; extern void tsc_get_info(tscInfo_t *info); extern void tsc_init(void); - +#endif /* ASSEMBLER */ #endif /* _I386_TSC_H_ */ #endif /* KERNEL_PRIVATE */