summaryrefslogtreecommitdiff
path: root/sys/firmware
diff options
context:
space:
mode:
authorsigsegv7 <ian@vegaa.systems>2023-09-15 23:03:11 -0400
committersigsegv7 <ian@vegaa.systems>2023-09-15 23:03:11 -0400
commit2003325ba7b913425fe805ace0039bc9d0401633 (patch)
tree40a759201af642f4660094ff787be006ebf95ff7 /sys/firmware
parent978c01caee421aeddb4fa32c934b4e51ab8133ed (diff)
kernel: dev: Add HPET driver
Signed-off-by: sigsegv7 <ian@vegaa.systems>
Diffstat (limited to 'sys/firmware')
-rw-r--r--sys/firmware/acpi/acpi_init.c9
1 files changed, 9 insertions, 0 deletions
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 <sys/cdefs.h>
#include <sys/panic.h>
#include <sys/syslog.h>
+#include <dev/timer/hpet.h>
#include <vm/vm.h>
__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__) */
}