HPET
include/acpi/hpet.h View source View on GitHubUnions
Section titled “Unions”hpet_timer_general_capabilities
Section titled “hpet_timer_general_capabilities”hpet_timer_config
Section titled “hpet_timer_config” union hpet_timer_config (2 fields) source
§
uint64_t raw §
struct §
uint64_t reserved0 : 1 §
uint64_t interrupt_type : 1 0 = edge, 1 = level
§
uint64_t interrupt_enable : 1 1 = interrupt enabled
§
uint64_t type : 1 0 = one-shot, 1 = periodic
§
uint64_t periodic_capable : 1 read-only
§
uint64_t size_capable : 1 read-only, 1 = 64-bit capable
§
uint64_t value_set : 1 §
uint64_t reserved1 : 1 §
uint64_t timer_32bit : 1 §
uint64_t ioapic_route : 5 §
uint64_t fsb_int_enable : 1 §
uint64_t fsb_int_delivery : 1 §
uint64_t reserved2 : 16 §
uint64_t route_cap : 32 Functions
Section titled “Functions”hpet_init
Section titled “hpet_init”void hpet_init(void) source hpet_timestamp_ns
Section titled “hpet_timestamp_ns”uint64_t hpet_timestamp_ns(void) source hpet_program_oneshot
Section titled “hpet_program_oneshot”void hpet_program_oneshot(uint64_t future_ms) source hpet_timestamp_ms
Section titled “hpet_timestamp_ms”uint64_t hpet_timestamp_ms(void) source hpet_timestamp_us
Section titled “hpet_timestamp_us”uint64_t hpet_timestamp_us(void) source hpet_disable
Section titled “hpet_disable”void hpet_disable(void) source hpet_enable
Section titled “hpet_enable”void hpet_enable(void) source hpet_clear_interrupt_status
Section titled “hpet_clear_interrupt_status”void hpet_clear_interrupt_status(void) source hpet_setup_timer
Section titled “hpet_setup_timer”hpet_write64
Section titled “hpet_write64”void hpet_write64(uint64_t offset, uint64_t value) source hpet_read64
Section titled “hpet_read64”uint64_t hpet_read64(uint64_t offset) source hpet_setup_periodic_interrupt_us
Section titled “hpet_setup_periodic_interrupt_us”void hpet_setup_periodic_interrupt_us(uint64_t microseconds_period) source Variables
Section titled “Variables”hpet_base
Section titled “hpet_base”hpet_timer_count
Section titled “hpet_timer_count”extern uint64_t hpet_timer_count source hpet_fs_per_tick
Section titled “hpet_fs_per_tick”extern uint64_t hpet_fs_per_tick source Macros
Section titled “Macros”HPET_GEN_CAP_ID_OFFSET
Section titled “HPET_GEN_CAP_ID_OFFSET”#define HPET_GEN_CAP_ID_OFFSET 0x0 source HPET_GEN_CONF_OFFSET
Section titled “HPET_GEN_CONF_OFFSET”#define HPET_GEN_CONF_OFFSET 0x10 source HPET_GEN_INT_STAT_OFFSET
Section titled “HPET_GEN_INT_STAT_OFFSET”#define HPET_GEN_INT_STAT_OFFSET 0x20 source HPET_IRQ_BASE
Section titled “HPET_IRQ_BASE”#define HPET_IRQ_BASE 2 source HPET_MAIN_COUNTER_OFFSET
Section titled “HPET_MAIN_COUNTER_OFFSET”#define HPET_MAIN_COUNTER_OFFSET 0xF0 source HPET_TIMER_CONF_OFFSET
Section titled “HPET_TIMER_CONF_OFFSET”#define HPET_TIMER_CONF_OFFSET(num) source Expansion
#define HPET_TIMER_CONF_OFFSET(num) (0x100 + (num * 0x20)) HPET_TIMER_COMPARATOR_OFFSET
Section titled “HPET_TIMER_COMPARATOR_OFFSET”#define HPET_TIMER_COMPARATOR_OFFSET(num) source Expansion
#define HPET_TIMER_COMPARATOR_OFFSET(num) (HPET_TIMER_CONF_OFFSET(num) + 0x8) HPET_CURRENT
Section titled “HPET_CURRENT”#define HPET_CURRENT (smp_id_raw() % hpet_timer_count) source TODO
We need to start using the HPET and figure out a caller contract
HPET_IRQ_LINE
Section titled “HPET_IRQ_LINE”#define HPET_IRQ_LINE 2 source