From 2003325ba7b913425fe805ace0039bc9d0401633 Mon Sep 17 00:00:00 2001 From: sigsegv7 Date: Fri, 15 Sep 2023 23:03:11 -0400 Subject: kernel: dev: Add HPET driver Signed-off-by: sigsegv7 --- sys/firmware/acpi/acpi_init.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sys/firmware') diff --git a/sys/firmware/acpi/acpi_init.c b/sys/firmware/acpi/acpi_init.c index 67c4d9c..89ce786 100644 --- a/sys/firmware/acpi/acpi_init.c +++ b/sys/firmware/acpi/acpi_init.c @@ -33,6 +33,7 @@ #include #include #include +#include #include __MODULE_NAME("acpi"); @@ -107,4 +108,12 @@ acpi_init(void) } root_sdt_entries = (root_sdt->hdr.length - sizeof(root_sdt->hdr)) / 4; acpi_parse_madt(); + +#if defined(__x86_64__) + /* Vega requires HPET on x86_64 */ + if (hpet_init() != 0) + panic("Machine does not support HPET!\n"); +#else + hpet_init(); +#endif /* defined(__x86_64__) */ } -- cgit v1.2.3