#include <mach/mach_time.h>
#include <arm/machine_routines.h>
-#define EndOfAllTime 0xFFFFFFFFFFFFFFFFULL
-#define DECREMENTER_MAX 0x7FFFFFFFUL
-#define DECREMENTER_MIN 0xAUL
+#define EndOfAllTime 0xFFFFFFFFFFFFFFFFULL
+#define DECREMENTER_MAX 0x7FFFFFFFUL
+#define DECREMENTER_MIN 0xAUL
typedef struct _rtclock_data_ {
- uint32_t rtc_sec_divisor;
- uint32_t rtc_usec_divisor;
- mach_timebase_info_data_t rtc_timebase_const;
- union {
- uint64_t abstime;
+ uint32_t rtc_sec_divisor;
+ uint32_t rtc_usec_divisor;
+ mach_timebase_info_data_t rtc_timebase_const;
+ union {
+ uint64_t abstime;
struct {
- uint32_t low;
- uint32_t high;
+ uint32_t low;
+ uint32_t high;
} abstime_val;
- } rtc_base;
- union {
- uint64_t abstime;
+ } rtc_base;
+ union {
+ uint64_t abstime;
struct {
- uint32_t low;
- uint32_t high;
+ uint32_t low;
+ uint32_t high;
} abstime_val;
- } rtc_adj;
- tbd_ops_data_t rtc_timebase_func;
+ } rtc_adj;
+ tbd_ops_data_t rtc_timebase_func;
/* Only needed for AIC manipulation */
- vm_offset_t rtc_timebase_addr;
- vm_offset_t rtc_timebase_val;
-
+ vm_offset_t rtc_timebase_addr;
+ vm_offset_t rtc_timebase_val;
} rtclock_data_t;
-extern rtclock_data_t RTClockData;
-#define rtclock_sec_divisor RTClockData.rtc_sec_divisor
-#define rtclock_usec_divisor RTClockData.rtc_usec_divisor
-#define rtclock_timebase_const RTClockData.rtc_timebase_const
-#define rtclock_base_abstime RTClockData.rtc_base.abstime
-#define rtclock_base_abstime_low RTClockData.rtc_base.abstime_val.low
-#define rtclock_base_abstime_high RTClockData.rtc_base.abstime_val.high
-#define rtclock_adj_abstime RTClockData.rtc_adj.abstime
-#define rtclock_adj_abstime_low RTClockData.rtc_adj.abstime_val.low
-#define rtclock_adj_abstime_high RTClockData.rtc_adj.abstime_val.high
-#define rtclock_timebase_func RTClockData.rtc_timebase_func
+extern rtclock_data_t RTClockData;
+#define rtclock_sec_divisor RTClockData.rtc_sec_divisor
+#define rtclock_usec_divisor RTClockData.rtc_usec_divisor
+#define rtclock_timebase_const RTClockData.rtc_timebase_const
+#define rtclock_base_abstime RTClockData.rtc_base.abstime
+#define rtclock_base_abstime_low RTClockData.rtc_base.abstime_val.low
+#define rtclock_base_abstime_high RTClockData.rtc_base.abstime_val.high
+#define rtclock_adj_abstime RTClockData.rtc_adj.abstime
+#define rtclock_adj_abstime_low RTClockData.rtc_adj.abstime_val.low
+#define rtclock_adj_abstime_high RTClockData.rtc_adj.abstime_val.high
+#define rtclock_timebase_func RTClockData.rtc_timebase_func
/* Only needed for AIC manipulation */
-#define rtclock_timebase_addr RTClockData.rtc_timebase_addr
-#define rtclock_timebase_val RTClockData.rtc_timebase_val
+#define rtclock_timebase_addr RTClockData.rtc_timebase_addr
+#define rtclock_timebase_val RTClockData.rtc_timebase_val
extern uint64_t arm_timer_slop_max;