Kernel: Set up and calibrate APIC timer, and enable timer on all CPUs

This enables the APIC timer on all CPUs, which means Scheduler::timer_tick
is now called on all CPUs independently. We still don't do anything on
the APs as it instantly crashes due to a number of other problems.
This commit is contained in:
Tom 2020-10-25 09:13:47 -06:00 committed by Andreas Kling
commit fe615e601a
Notes: sideshowbarker 2024-07-19 01:43:30 +09:00
14 changed files with 478 additions and 70 deletions

View file

@ -149,7 +149,7 @@ extern "C" [[noreturn]] void init()
__stack_chk_guard = get_fast_random<u32>();
TimeManagement::initialize();
TimeManagement::initialize(0);
NullDevice::initialize();
if (!get_serial_debug())
@ -208,6 +208,7 @@ extern "C" void init_finished(u32 cpu)
// TODO: we can reuse the boot stack, maybe for kmalloc()?
} else {
APIC::the().init_finished(cpu);
TimeManagement::initialize(cpu);
}
}