Add support for 2MB and 1GB map

This commit is contained in:
Alex
2023-04-07 01:39:11 +03:00
parent 5becc15ed7
commit 540152a339
10 changed files with 239 additions and 116 deletions

View File

@ -723,8 +723,7 @@ namespace Tasking
{
Process->PageTable = (Memory::PageTable4 *)KernelAllocator.RequestPages(TO_PAGES(PAGE_SIZE));
memcpy(Process->PageTable, (void *)UserspaceKernelOnlyPageTable, PAGE_SIZE);
for (size_t i = 0; i < TO_PAGES(PAGE_SIZE); i++)
Memory::Virtual(Process->PageTable).Map((void *)Process->PageTable, (void *)Process->PageTable, Memory::PTFlag::RW); // Make sure the page table is mapped.
Memory::Virtual(Process->PageTable).Map((void *)Process->PageTable, (void *)Process->PageTable, Memory::PTFlag::RW); // Make sure the page table is mapped.
}
#elif defined(a32)
#elif defined(aa64)