|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include <type.h>Go to the source code of this file.
Data Structures | |
| struct | address_structure |
| struct | description_table_header |
| struct | hpet |
Macros | |
| #define | HPET_GENERAL_CAP_ID 0x0 |
| #define | HPET_GENERAL_CONFIG 0x10 |
| #define | HPET_ENABLE_CNF 0x1 |
| #define | HPET_MAIN_COUNT 0x0F0 |
| #define | HPET_TIMER_CONFIG(N) |
| #define | HPET_TIMER_COMPARATOR(N) |
| #define | ms2ns(ms) |
| #define | us2ns(us) |
| #define | ns2ms(x) |
Functions | |
| struct address_structure | __attribute__ ((packed)) |
| void | vxHPETInitialize (uintptr_t addr) |
| void | hpet_level_timer_setup (uint32_t n, uint64_t tick_count, int irq) |
| uint64_t | vxHPETMinTickNs (void) |
| void | hpet_enable () |
| void | hpet_disable () |
| uint64_t | vxHPETGetMainCount () |
| void | vxHPETSleep (uint64_t ns) |
| boolean_t | vxHPETIsAvailable () |
| #define HPET_GENERAL_CAP_ID 0x0 |
Definition at line 6 of file hpet.h.
Referenced by vxHPETInitialize(), and vxHPETMinTickNs().
| #define HPET_GENERAL_CONFIG 0x10 |
Definition at line 7 of file hpet.h.
Referenced by hpet_disable(), and hpet_enable().
| #define HPET_MAIN_COUNT 0x0F0 |
Definition at line 9 of file hpet.h.
Referenced by vxHPETGetMainCount(), and vxHPETInitialize().
| #define HPET_TIMER_COMPARATOR | ( | N | ) |
Definition at line 11 of file hpet.h.
Referenced by hpet_level_timer_setup().
| #define HPET_TIMER_CONFIG | ( | N | ) |
Definition at line 10 of file hpet.h.
Referenced by hpet_level_timer_setup().
| #define ms2ns | ( | ms | ) |
Definition at line 12 of file hpet.h.
Referenced by sipi_sequential(), and wait_until_receive_notify().
| #define ns2ms | ( | x | ) |
Definition at line 14 of file hpet.h.
Referenced by get_timer_counter_count_ms(), and vxSchedulerTick().
| #define us2ns | ( | us | ) |
| struct address_structure __attribute__ | ( | (packed) | ) |
| 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.
| 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().
| struct address_structure address |
Definition at line 4 of file hpet.h.
Referenced by EHCIModule::assign_address(), pci_readl(), pci_writel(), and EHCIModule::unload().
| uint16_t checksum |
Definition at line 3 of file hpet.h.
Referenced by __attribute__().
| struct description_table_header header |