|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "hal/acpi/acpi.h"#include "hal/cpu/cpuid.h"#include "libk/io.h"#include "libk/serial.h"#include <type.h>#include <hal/acpi/hpet.h>#include <str.h>Go to the source code of this file.
Functions | |
| boolean_t | vxHPETIsAvailable () |
| static void | hpet_write (uint32_t reg, uint64_t value) |
| static uint64_t | hpet_read (uint32_t reg) |
| void | hpet_enable () |
| void | hpet_disable () |
| uint64_t | vxHPETMinTickNs (void) |
| void | hpet_level_timer_setup (uint32_t n, uint64_t tick_count, int irq) |
| void | vxHPETInitialize (uintptr_t addr) |
| uint64_t | vxHPETGetMainCount () |
| void | vxHPETSleep (uint64_t ns) |
Variables | |
| static volatile uintptr_t | hpet_address = 0 |
| static uint64_t | min_tick_ns = 0 |
| boolean_t | hpet_available = 0 |
| void hpet_disable | ( | ) |
Definition at line 32 of file hpet.c.
References HPET_GENERAL_CONFIG, and hpet_write().
Referenced by vxAPICTimerCalibrationUsingHPET(), and vxHPETInitialize().
| void hpet_enable | ( | ) |
Definition at line 26 of file hpet.c.
References HPET_GENERAL_CONFIG, hpet_read(), and hpet_write().
Referenced by vxAPICTimerCalibrationUsingHPET(), and vxHPETInitialize().
Definition at line 42 of file hpet.c.
References cap, hpet_read(), HPET_TIMER_COMPARATOR, HPET_TIMER_CONFIG, hpet_write(), and LOG2_ERROR.
Definition at line 22 of file hpet.c.
References hpet_address, mmio_inll(), and reg.
Referenced by hpet_enable(), hpet_level_timer_setup(), vxHPETGetMainCount(), vxHPETInitialize(), and vxHPETMinTickNs().
Definition at line 18 of file hpet.c.
References hpet_address, mmio_outll(), reg, and value.
Referenced by hpet_disable(), hpet_enable(), hpet_level_timer_setup(), and vxHPETInitialize().
| uint64_t vxHPETGetMainCount | ( | ) |
Definition at line 82 of file hpet.c.
References HPET_MAIN_COUNT, and hpet_read().
Referenced by get_timer_counter_count(), get_timer_counter_count_ms(), init_timer_counter(), vxHPETSleep(), vxRand(), and vxSchedulerTick().
| void vxHPETInitialize | ( | uintptr_t | addr | ) |
Definition at line 54 of file hpet.c.
References acpi_map_phys_page(), addr, cap, hpet_address, hpet_available, hpet_disable(), hpet_enable(), HPET_GENERAL_CAP_ID, HPET_MAIN_COUNT, hpet_read(), hpet_write(), LOG2_INFO, memcopy(), min_tick_ns, strncmp(), and table.
Referenced by __attribute__().
| boolean_t vxHPETIsAvailable | ( | ) |
Definition at line 14 of file hpet.c.
References hpet_available.
| uint64_t vxHPETMinTickNs | ( | void | ) |
Definition at line 36 of file hpet.c.
References HPET_GENERAL_CAP_ID, and hpet_read().
Referenced by get_timer_counter_count_ms(), and get_timer_counter_count_ns().
| void vxHPETSleep | ( | uint64_t | ns | ) |
Definition at line 86 of file hpet.c.
References hpet_available, min_tick_ns, and vxHPETGetMainCount().
Referenced by INIT(), sipi_sequential(), and usleep().
|
static |
Definition at line 10 of file hpet.c.
Referenced by hpet_read(), hpet_write(), and vxHPETInitialize().
| boolean_t hpet_available = 0 |
Definition at line 12 of file hpet.c.
Referenced by vxHPETInitialize(), vxHPETIsAvailable(), and vxHPETSleep().
|
static |
Definition at line 11 of file hpet.c.
Referenced by vxHPETInitialize(), and vxHPETSleep().