idek
This commit is contained in:
parent
b7a1a35180
commit
d5371bcbb2
2 changed files with 10 additions and 10 deletions
|
@ -78,14 +78,6 @@ void smp_init(void)
|
|||
{
|
||||
set_cpu_local(&cpu_locals[i]);
|
||||
log_early("CPU %u is the bootstrap processor", i);
|
||||
|
||||
/* Disable legacy PIC to prepare for APIC */
|
||||
outb(0x21, 0xff);
|
||||
outb(0xA1, 0xff);
|
||||
|
||||
/* Setup APIC */
|
||||
lapic_init();
|
||||
|
||||
atomic_fetch_add(&started_cpus, 1);
|
||||
cpu_locals[i].ready = true;
|
||||
}
|
||||
|
@ -97,6 +89,7 @@ void smp_init(void)
|
|||
}
|
||||
}
|
||||
|
||||
/* trick to wait for all procs to be ready */
|
||||
bool all_ready = false;
|
||||
while (!all_ready)
|
||||
{
|
||||
|
|
|
@ -166,6 +166,9 @@ void emk_entry(void)
|
|||
kpanic(NULL, "Failed to get MP request");
|
||||
}
|
||||
|
||||
mp_response = mp_request.response;
|
||||
smp_init();
|
||||
|
||||
/* Setup ACPI */
|
||||
rsdp_response = rsdp_request.response;
|
||||
if (!rsdp_response)
|
||||
|
@ -175,8 +178,12 @@ void emk_entry(void)
|
|||
acpi_init();
|
||||
madt_init(); // Also init MADT, to prepare for APIC
|
||||
|
||||
mp_response = mp_request.response;
|
||||
smp_init();
|
||||
/* Disable legacy PIC to prepare for APIC */
|
||||
outb(0x21, 0xff);
|
||||
outb(0xA1, 0xff);
|
||||
|
||||
/* Setup APIC */
|
||||
lapic_init();
|
||||
|
||||
/* Finished */
|
||||
log_early("%s", LOG_SEPARATOR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue