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

已合并
harraiken 2025-08-23 20:03:56 +02:00 将 35 次代码提交从 harraiken_mm合并至 master
仅显示提交 d602038858 的更改 - 显示所有提交

查看文件

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