From 8eb9ee85529a6140a533ffeb52f5e7f4078d9f27 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 11 Sep 2020 13:18:10 +0200 Subject: Some testing using the q35 chipset --- kernel/drivers/acpi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'kernel') diff --git a/kernel/drivers/acpi.c b/kernel/drivers/acpi.c index e853a6f..0db4522 100644 --- a/kernel/drivers/acpi.c +++ b/kernel/drivers/acpi.c @@ -83,12 +83,14 @@ void hpet_install(int period) struct hpet_registers *r = (struct hpet_registers *)hpet->address.phys; printf("HPET tick period: %dns\n", HPET_MAX_PERIOD / r->tick_period); if ((r->timer0 & hpet_periodic_support) == hpet_periodic_support) { - r->config |= hpet_enable; - r->config |= hpet_legacy_replacement; r->timer0 |= hpet_periodic | hpet_set_accumulator | hpet_enable_timer; + r->config |= hpet_legacy_replacement; + r->config |= hpet_enable; assert(r->tick_period + period < HPET_MAX_PERIOD); r->timer_comparator0 = r->tick_period + period; r->timer_comparator0 = period; + } else { + hpet = NULL; } } else { hpet = NULL; -- cgit v1.2.3