Kernel: Move smp_initialized flag after schedulers are initialized
Before this real hardware failed to boot with smp enabled. Allocating the idle thread does a page mapping which ends up broadcasting TLB shootdown to other processes. This ends up failing somewhere halting the processors never allowing them to initialize their scheduler
This commit is contained in:
@@ -189,8 +189,6 @@ namespace Kernel
|
||||
__builtin_ia32_pause();
|
||||
}
|
||||
}
|
||||
|
||||
s_is_smp_enabled = true;
|
||||
}
|
||||
|
||||
void Processor::handle_ipi()
|
||||
|
||||
@@ -136,6 +136,9 @@ namespace Kernel
|
||||
while (s_schedulers_initialized < Processor::count())
|
||||
__builtin_ia32_pause();
|
||||
|
||||
if (Processor::count() > 1)
|
||||
Processor::set_smp_enabled();
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user