10 #define XTF_X86_HPET_H 17 #define HPET_ID_MAX_PERIOD 0x05f5e100 18 #define HPET_ID_NUMBER_MASK 0x1f00 20 #define HPET_CFG 0x010 21 #define HPET_CFG_ENABLE 0x001 23 #define HPET_COUNTER 0x0f0 25 #define HPET_Tn_CFG(n) (0x100 + (n) * 0x20) 27 #define HPET_Tn_CMP(n) (0x108 + (n) * 0x20) 29 #define HPET_DEFAULT_BASE 0xfed00000 83 bool level,
bool periodic,
bool mode32bit);
Common declarations for all tests.
Varadic macro helpers - Here be many dragons.
#define IS_DEFINED(x)
Evalute whether the CONFIG_ token x is defined.
void hpet_init_timer(unsigned int nr, unsigned int irq, uint64_t ticks, bool level, bool periodic, bool mode32bit)
Setup and enable a specific HPET timer.
static void hpet_write32(unsigned int reg, uint32_t val)
Primatives for number manipulation.
int hpet_init(void)
Discover and initialise the HPET.
unsigned int hpet_nr_timers
static void hpet_write64(unsigned int reg, uint64_t val)
static uint32_t hpet_read32(unsigned int reg)
#define _p(v)
Express an abitrary integer v as void *.
static uint64_t hpet_read_counter(void)
Fetch the HPET main counter register.
#define HPET_DEFAULT_BASE
static uint64_t hpet_read64(unsigned int reg)