aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers/acpi.c
diff options
context:
space:
mode:
authorMarvin Borner2020-09-11 13:18:10 +0200
committerMarvin Borner2020-09-11 13:18:10 +0200
commit8eb9ee85529a6140a533ffeb52f5e7f4078d9f27 (patch)
tree6947d6233b0ed5d6883e3b01c813ba12d468e7a1 /kernel/drivers/acpi.c
parent36d7c86a1e9e72d689d672a0e8576adbc740d541 (diff)
Some testing using the q35 chipset
Diffstat (limited to 'kernel/drivers/acpi.c')
-rw-r--r--kernel/drivers/acpi.c6
1 files changed, 4 insertions, 2 deletions
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;