diff options
author | Ian Moffett <ian@osmora.org> | 2024-06-04 15:52:13 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-06-04 15:53:50 -0400 |
commit | 7c29fb70b00315bba95fa2a8b044e88a8d0b32d1 (patch) | |
tree | 9472bda335a998c03dfdc9af7b2a30789e24c27c /sys/dev | |
parent | 996e41f4d86d9369d62700383ab090bdba2be9a7 (diff) |
kernel/amd64: Add HPET driver
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpi/acpi_init.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/acpi/acpi_init.c b/sys/dev/acpi/acpi_init.c index a8423e4..f445d95 100644 --- a/sys/dev/acpi/acpi_init.c +++ b/sys/dev/acpi/acpi_init.c @@ -48,6 +48,16 @@ static volatile struct limine_rsdp_request rsdp_req = { .revision = 0 }; +static void +acpi_init_hpet(void) +{ +#if defined(__x86_64__) + if (hpet_init() != 0) { + panic("Could not init HPET\n"); + } +#endif +} + /* * Writes out OEMID of ACPI header. * @@ -107,4 +117,5 @@ acpi_init(void) } root_sdt_entries = (root_sdt->hdr.length - sizeof(root_sdt->hdr)) / 4; + acpi_init_hpet(); } |