mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-19 22:25:36 +00:00
Kernel: Unmap Prekernel pages after they are no longer needed
The Prekernel's memory is only accessed until MemoryManager has been initialized. Keeping them around afterwards is both unnecessary and bad, as it prevents the userland from using the 0x100000-0x155000 virtual address range. Co-authored-by: Idan Horowitz <idan.horowitz@gmail.com>
This commit is contained in:
committed by
Brian Gianforcaro
parent
2f1b4b8a81
commit
4fc28bfe02
@@ -193,6 +193,8 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init(BootInfo const& boot_info)
|
||||
CommandLine::initialize();
|
||||
Memory::MemoryManager::initialize(0);
|
||||
|
||||
MM.unmap_prekernel();
|
||||
|
||||
// Ensure that the safemem sections are not empty. This could happen if the linker accidentally discards the sections.
|
||||
VERIFY(+start_of_safemem_text != +end_of_safemem_text);
|
||||
VERIFY(+start_of_safemem_atomic_text != +end_of_safemem_atomic_text);
|
||||
|
||||
Reference in New Issue
Block a user