mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:28:11 +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:
parent
2f1b4b8a81
commit
4fc28bfe02
4 changed files with 31 additions and 8 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue