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:
parent
39fcd92210
commit
c3c905aa6c
Notes:
sideshowbarker
2024-07-19 11:19:43 +09:00
Author: https://github.com/supercomputer7
Commit: c3c905aa6c
Pull-request: https://github.com/SerenityOS/serenity/pull/741
Reviewed-by: https://github.com/awesomekling
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