summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorIdan Horowitz <idan.horowitz@gmail.com>2021-05-17 19:23:04 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-17 19:29:55 +0200
commit0ac331776428daca1a9a751e92df8ed91ffa7f73 (patch)
treeb88968e9cba30ec77b79535a059ce49819dfd114 /Kernel
parent0262a99a1f0b0c07de4a5742d05338133b18c3ef (diff)
downloadserenity-0ac331776428daca1a9a751e92df8ed91ffa7f73.zip
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.
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/Time/HPETComparator.cpp1
1 files changed, 1 insertions, 0 deletions
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;
}