From 0ac331776428daca1a9a751e92df8ed91ffa7f73 Mon Sep 17 00:00:00 2001 From: Idan Horowitz Date: Mon, 17 May 2021 19:23:04 +0300 Subject: [PATCH] Kernel: Set InterruptEnable on HPET Comparators when frequency is set This fixes non-periodic comparators not receiving interrupts, as we were never setting the InterruptEnable bit in their capabilities register (unlike periodic comparators's bit, which was set as a side effect of calling set_periodic on them to set their periodic bit). This should help getting profiling work on bare-metal SerenityOS installations, which were not guaranteed to have 2 periodic comparators available. --- Kernel/Time/HPETComparator.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Kernel/Time/HPETComparator.cpp b/Kernel/Time/HPETComparator.cpp index 21c1bda5a6..7b974e554f 100644 --- a/Kernel/Time/HPETComparator.cpp +++ b/Kernel/Time/HPETComparator.cpp @@ -99,6 +99,7 @@ bool HPETComparator::try_to_set_frequency(size_t frequency) } else { HPET::the().update_non_periodic_comparator_value(*this); } + HPET::the().enable(*this); enable_irq(); // Enable if we haven't already return true; }