Refactor MMU for multi-paging support and add 5-Level paging #16

Merged
harraiken merged 35 commits from harraiken_mm into master 2025-08-23 20:03:56 +02:00
Showing only changes of commit d602038858 - Show all commits

View File

@ -43,13 +43,14 @@ XtpDeterminePagingLevel(IN CONST PWCHAR Parameters)
/* Query CPUID */ /* Query CPUID */
ArCpuId(&CpuRegisters); ArCpuId(&CpuRegisters);
/* Check if eXtended Physical Addressing (XPA) is enabled and if LA57 is supported by the CPU */ // TODO: Uncomment the following code when LA57 support is implemented in the bootloader
if((CpuRegisters.Ecx & CPUID_FEATURES_ECX_LA57) && // /* Check if eXtended Physical Addressing (XPA) is enabled and if LA57 is supported by the CPU */
!(XtLdrProtocol->BootUtil.GetBooleanParameter(Parameters, L"NOXPA"))) // if((CpuRegisters.Ecx & CPUID_FEATURES_ECX_LA57) &&
{ // !(XtLdrProtocol->BootUtil.GetBooleanParameter(Parameters, L"NOXPA")))
/* Enable LA57 (PML5) */ // {
return 5; // /* Enable LA57 (PML5) */
} // return 4;
// }
} }
/* Disable LA57 and use PML4 by default */ /* Disable LA57 and use PML4 by default */