mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
Kernel: Various APIC timer fixes
This commit is contained in:
parent
b8ad4932a9
commit
8c764319ad
Notes:
sideshowbarker
2024-07-19 01:43:23 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/8c764319adf Pull-request: https://github.com/SerenityOS/serenity/pull/3856
2 changed files with 1 additions and 2 deletions
|
@ -588,7 +588,6 @@ void APIC::setup_local_timer(u32 ticks, TimerMode timer_mode, bool enable)
|
|||
default:
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
config |= 3; // divide by 16
|
||||
write_register(APIC_REG_TIMER_CONFIGURATION, config);
|
||||
|
||||
if (timer_mode == TimerMode::Periodic)
|
||||
|
|
|
@ -115,7 +115,7 @@ bool APICTimer::calibrate(HardwareTimerBase& calibration_source)
|
|||
auto delta_apic_count = end_apic_count - start_apic_count;
|
||||
m_timer_period = (delta_apic_count * apic.get_timer_divisor()) / ticks_in_100ms;
|
||||
|
||||
auto apic_freq = (delta_apic_count * 16) / apic.get_timer_divisor();
|
||||
auto apic_freq = (delta_apic_count * apic.get_timer_divisor()) / apic.get_timer_divisor();
|
||||
if (apic_freq < 1000000) {
|
||||
klog() << "APICTimer: Frequency too slow!";
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue