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.
This commit is contained in:
Idan Horowitz 2021-05-17 19:23:04 +03:00 committed by Andreas Kling
parent 0262a99a1f
commit 0ac3317764
Notes: sideshowbarker 2024-07-18 17:56:20 +09:00

View file

@ -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;
}