|
PatchworkOS
|
#include <kernel/drivers/hpet.h>#include <kernel/acpi/tables.h>#include <kernel/log/log.h>#include <kernel/log/panic.h>#include <kernel/mem/vmm.h>#include <kernel/utils/utils.h>#include <assert.h>Go to the source code of this file.
Functions | |
| static uint64_t | hpet_init (sdt_header_t *table) |
| ACPI_SDT_HANDLER_REGISTER ("HPET", hpet_init) | |
| clock_t | hpet_nanoseconds_per_tick (void) |
| Retrieve the number of nanoseconds per HPET tick. | |
| uint64_t | hpet_read_counter (void) |
| Read the current value of the HPET main counter. | |
| void | hpet_reset_counter (void) |
| Reset the HPET main counter to 0 and enable the HPET. | |
| void | hpet_write (uint64_t reg, uint64_t value) |
| Write a value to an HPET register. | |
| uint64_t | hpet_read (uint64_t reg) |
| Read a value from an HPET register. | |
| void | hpet_wait (clock_t nanoseconds) |
| Wait for a specified number of nanoseconds using the HPET. | |
Variables | |
| static hpet_t * | hpet |
| static uintptr_t | address |
| static uint64_t | period |
| static bool | isInitialized = false |
| ACPI_SDT_HANDLER_REGISTER | ( | "HPET" | , |
| hpet_init | |||
| ) |
|
static |
Definition at line 17 of file hpet.c.
References hpet_t::address, address, hpet_t::addressSpaceId, CLOCKS_PER_SEC, hpet_t::comparatorCount, hpet_t::counterIs64Bit, ERR, hpet, HPET_ADDRESS_SPACE_MEMORY, HPET_CAP_COUNTER_CLK_PERIOD_SHIFT, HPET_FEMTOSECONDS_PER_SECOND, hpet_read(), HPET_REG_GENERAL_CAPABILITIES_ID, hpet_reset_counter(), isInitialized, LOG_ERR, LOG_INFO, NULL, PAGE_SIZE, period, PML_GLOBAL, PML_LOWER_TO_HIGHER, PML_PRESENT, PML_WRITE, and vmm_map().
|
static |
Definition at line 12 of file hpet.c.
Referenced by _syscall_mmap(), _syscall_mprotect(), _syscall_munmap(), aml_ensure_mem_is_mapped(), aml_generic_field_read_at(), aml_generic_field_write_at(), aml_opregion_read(), aml_opregion_write(), aml_pci_config_read(), aml_pci_config_write(), aml_system_io_read(), aml_system_io_write(), aml_system_mem_read(), aml_system_mem_write(), hpet_init(), hpet_read(), hpet_write(), local_listen_find(), local_listen_new(), local_socket_bind(), local_socket_connect(), mmap(), mprotect(), munmap(), page_table_page_buffer_push(), pci_config_get_address(), pmm_alloc(), pmm_alloc_bitmap(), pmm_alloc_pages(), pmm_bitmap_free(), pmm_free(), pmm_free_pages_unlocked(), pmm_free_region(), pmm_free_unlocked(), pmm_stack_alloc(), pmm_stack_free(), shmem_mmap(), shmem_object_allocate_pages(), space_pin_depth_dec(), space_pin_depth_inc(), space_pin_terminated(), space_unpin(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), SYSCALL_DEFINE(), and vfs_mmap().
|
static |
Definition at line 11 of file hpet.c.
Referenced by hpet_init().
Definition at line 15 of file hpet.c.
Referenced by hpet_init(), hpet_nanoseconds_per_tick(), hpet_read(), hpet_read_counter(), hpet_reset_counter(), hpet_wait(), and hpet_write().
|
static |
Definition at line 13 of file hpet.c.
Referenced by hpet_init(), hpet_nanoseconds_per_tick(), and hpet_wait().