mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00: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:
parent
39fcd92210
commit
c3c905aa6c
5 changed files with 18 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue