fix/kernel: Fixed spelling mistakes
This commit is contained in:
parent
93d09b1930
commit
b7a1a35180
2 changed files with 13 additions and 10 deletions
|
@ -8,6 +8,8 @@
|
||||||
#include <stdatomic.h>
|
#include <stdatomic.h>
|
||||||
#include <lib/string.h>
|
#include <lib/string.h>
|
||||||
#include <mm/heap.h>
|
#include <mm/heap.h>
|
||||||
|
#include <arch/io.h>
|
||||||
|
#include <sys/apic/lapic.h>
|
||||||
|
|
||||||
#define MAX_CPUS 256
|
#define MAX_CPUS 256
|
||||||
#define MSR_GS_BASE 0xC0000101
|
#define MSR_GS_BASE 0xC0000101
|
||||||
|
@ -76,6 +78,14 @@ void smp_init(void)
|
||||||
{
|
{
|
||||||
set_cpu_local(&cpu_locals[i]);
|
set_cpu_local(&cpu_locals[i]);
|
||||||
log_early("CPU %u is the bootstrap processor", 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);
|
atomic_fetch_add(&started_cpus, 1);
|
||||||
cpu_locals[i].ready = true;
|
cpu_locals[i].ready = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ void emk_entry(void)
|
||||||
/* Just do nothing */
|
/* Just do nothing */
|
||||||
}
|
}
|
||||||
|
|
||||||
log_early("Experimental Micro Kernel (EMK) 1.0 Copytright (c) 2025 Piraterna");
|
log_early("Experimental Micro Kernel (EMK) 1.0 Copyright (c) 2025 Piraterna");
|
||||||
log_early("Compiled at %s %s, emk1.0-%s, flanterm support: %s", __TIME__, __DATE__, BUILD_MODE, FLANTERM_SUPPORT ? "yes" : "no");
|
log_early("Compiled at %s %s, emk1.0-%s, flanterm support: %s", __TIME__, __DATE__, BUILD_MODE, FLANTERM_SUPPORT ? "yes" : "no");
|
||||||
log_early("%s", LOG_SEPARATOR);
|
log_early("%s", LOG_SEPARATOR);
|
||||||
|
|
||||||
|
@ -166,9 +166,6 @@ void emk_entry(void)
|
||||||
kpanic(NULL, "Failed to get MP request");
|
kpanic(NULL, "Failed to get MP request");
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_response = mp_request.response;
|
|
||||||
smp_init();
|
|
||||||
|
|
||||||
/* Setup ACPI */
|
/* Setup ACPI */
|
||||||
rsdp_response = rsdp_request.response;
|
rsdp_response = rsdp_request.response;
|
||||||
if (!rsdp_response)
|
if (!rsdp_response)
|
||||||
|
@ -178,12 +175,8 @@ void emk_entry(void)
|
||||||
acpi_init();
|
acpi_init();
|
||||||
madt_init(); // Also init MADT, to prepare for APIC
|
madt_init(); // Also init MADT, to prepare for APIC
|
||||||
|
|
||||||
/* Disable legacy PIC to prepare for APIC */
|
mp_response = mp_request.response;
|
||||||
outb(0x21, 0xff);
|
smp_init();
|
||||||
outb(0xA1, 0xff);
|
|
||||||
|
|
||||||
/* Setup APIC */
|
|
||||||
lapic_init();
|
|
||||||
|
|
||||||
/* Finished */
|
/* Finished */
|
||||||
log_early("%s", LOG_SEPARATOR);
|
log_early("%s", LOG_SEPARATOR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue