1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

Kernel: Removing hardcoded offsets from Memory Manager

Now the kernel page directory and the page tables are located at a
safe address, to prevent from paging data colliding with garbage.
This commit is contained in:
supercomputer7 2019-11-08 16:37:33 +02:00 committed by Andreas Kling
parent 39fcd92210
commit c3c905aa6c
Notes: sideshowbarker 2024-07-19 11:19:43 +09:00
5 changed files with 18 additions and 12 deletions

View file

@ -206,7 +206,7 @@ extern "C" int __cxa_atexit ( void (*)(void *), void *, void *)
return 0;
}
extern "C" [[noreturn]] void init()
extern "C" [[noreturn]] void init(u32 physical_address_for_kernel_page_tables)
{
// this is only used one time, directly below here. we can't use this part
// of libc at this point in the boot process, or we'd just pull strstr in
@ -268,7 +268,7 @@ extern "C" [[noreturn]] void init()
kprintf("Starting Serenity Operating System...\n");
MemoryManager::initialize();
MemoryManager::initialize(physical_address_for_kernel_page_tables);
if (APIC::init())
APIC::enable(0);