diff options
author | Tom <tomut@yahoo.com> | 2020-10-29 15:07:20 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-29 22:10:20 +0100 |
commit | d076b002485315bdaa778e4d085c4a47613e86f5 (patch) | |
tree | 0672f7681af201b589c41c20d0df341c3a5c6357 /Kernel/Time/APICTimer.cpp | |
parent | 3fa0b887ed99dbea164754ca86037a4939c7bc6a (diff) | |
download | serenity-d076b002485315bdaa778e4d085c4a47613e86f5.zip |
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.
Diffstat (limited to 'Kernel/Time/APICTimer.cpp')
-rw-r--r-- | Kernel/Time/APICTimer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Time/APICTimer.cpp b/Kernel/Time/APICTimer.cpp index 8488949794..96d792bf77 100644 --- a/Kernel/Time/APICTimer.cpp +++ b/Kernel/Time/APICTimer.cpp @@ -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(); |