Kernel: Don't even loop over processor when system has only BSP
This commit is contained in:
parent
bb061d2a0a
commit
1479b42112
|
@ -247,6 +247,13 @@ namespace Kernel
|
||||||
uint8_t bsp_id = Kernel::Processor::current_id();
|
uint8_t bsp_id = Kernel::Processor::current_id();
|
||||||
dprintln("BSP lapic id: {}", bsp_id);
|
dprintln("BSP lapic id: {}", bsp_id);
|
||||||
|
|
||||||
|
if (m_processors.size() == 1)
|
||||||
|
{
|
||||||
|
dprintln("Only one processor, skipping AP initialization");
|
||||||
|
*g_ap_startup_done = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& processor : m_processors)
|
for (auto& processor : m_processors)
|
||||||
{
|
{
|
||||||
if (processor.apic_id == bsp_id)
|
if (processor.apic_id == bsp_id)
|
||||||
|
|
Loading…
Reference in New Issue