Преглед на файлове

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.
Idan Horowitz преди 4 години
родител
ревизия
0ac3317764
променени са 1 файла, в които са добавени 1 реда и са изтрити 0 реда
  1. 1 0
      Kernel/Time/HPETComparator.cpp

+ 1 - 0
Kernel/Time/HPETComparator.cpp

@@ -99,6 +99,7 @@ bool HPETComparator::try_to_set_frequency(size_t frequency)
     } else {
     } else {
         HPET::the().update_non_periodic_comparator_value(*this);
         HPET::the().update_non_periodic_comparator_value(*this);
     }
     }
+    HPET::the().enable(*this);
     enable_irq(); // Enable if we haven't already
     enable_irq(); // Enable if we haven't already
     return true;
     return true;
 }
 }