Kernel: Fix multiprocessing on x86_64

I did not even start APs after initializing them... :D
This commit is contained in:
2024-04-03 14:21:55 +03:00
parent 731330c6b5
commit f8c01418b1
8 changed files with 88 additions and 74 deletions

View File

@@ -218,7 +218,9 @@ extern "C" void ap_main()
dprintln("ap{} initialized", Processor::current_id());
while (!Scheduler::is_started())
__builtin_ia32_pause();
Scheduler::get().start();
// wait until scheduler is started and we get irq for reschedule
Processor::set_interrupt_state(InterruptState::Enabled);
while (true)
asm volatile("hlt");
ASSERT_NOT_REACHED();
}