Kernel: Rewrite x86_64 page tables to use HHDM instead of kmalloc

This allows page tables to not crash the kernel once kmalloc runs out of
its (limited) static memory.
This commit is contained in:
2024-10-14 11:40:30 +03:00
parent f0b18da881
commit 8fd0162393
4 changed files with 423 additions and 143 deletions

View File

@@ -46,7 +46,7 @@ namespace Kernel
return result;
}
void PageTable::initialize()
void PageTable::initialize_pre_heap()
{
if (CPUID::has_nxe())
s_has_nxe = true;
@@ -65,6 +65,11 @@ namespace Kernel
s_kernel->initial_load();
}
void PageTable::initialize_post_heap()
{
// NOTE: this is no-op as our 32 bit target does not use hhdm
}
void PageTable::initial_load()
{
if (s_has_nxe)