mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
Kernel: Setup APIC AP cores boot environment before init_stage2
Since this range is mapped in already in the kernel page directory, we can initialize it before jumping into the first kernel process which lets us avoid mapping in the range into init_stage2's address space. This brings us half-way to removing the shared bottom 2 MiB mapping in every process, leaving only the Prekernel.
This commit is contained in:
parent
6c8f1e62db
commit
fd3be7ffcc
3 changed files with 34 additions and 9 deletions
|
@ -216,6 +216,13 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
|||
|
||||
Scheduler::initialize();
|
||||
|
||||
if (APIC::initialized() && APIC::the().enabled_processor_count() > 1) {
|
||||
// We must set up the AP boot environment before switching to a kernel process,
|
||||
// as pages below address USER_RANGE_BASE are only accesible through the kernel
|
||||
// page directory.
|
||||
APIC::the().setup_ap_boot_environment();
|
||||
}
|
||||
|
||||
dmesgln("Starting SerenityOS...");
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue