17#define HPET_ID_MAX_PERIOD 0x05f5e100
18#define HPET_ID_NUMBER_MASK 0x1f00
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);
static void hpet_write64(unsigned int reg, uint64_t val)
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.
#define HPET_DEFAULT_BASE
static void hpet_write32(unsigned int reg, uint32_t val)
int hpet_init(void)
Discover and initialise the HPET.
static uint64_t hpet_read64(unsigned int reg)
unsigned int hpet_nr_timers
static uint64_t hpet_read_counter(void)
Fetch the HPET main counter register.
static uint32_t hpet_read32(unsigned int reg)
Varadic macro helpers - Here be many dragons.
#define IS_DEFINED(x)
Evalute whether the CONFIG_ token x is defined.
Primatives for number manipulation.
#define _p(v)
Express an abitrary integer v as void *.
Common declarations for all tests.