mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:48:11 +00:00
Kernel: Fix APIC timer frequency
The APIC current count register decrements on each clock tick. Fixes the APIC timer firing much less frequently than it should be.
This commit is contained in:
parent
3fa0b887ed
commit
d076b00248
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ bool APICTimer::calibrate(HardwareTimerBase& calibration_source)
|
|||
|
||||
disable_local_timer();
|
||||
|
||||
auto delta_apic_count = end_apic_count - start_apic_count;
|
||||
auto delta_apic_count = start_apic_count - end_apic_count; // The APIC current count register decrements!
|
||||
m_timer_period = (delta_apic_count * apic.get_timer_divisor()) / ticks_in_100ms;
|
||||
|
||||
auto apic_freq = (delta_apic_count * apic.get_timer_divisor()) / apic.get_timer_divisor();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue