Get rid of boot services code after exiting boot services

这个提交包含在:
2022-12-20 23:06:32 +01:00
父节点 7c38efc802
当前提交 51886a05dd
修改 2 个文件,包含 8 行新增0 行删除

查看文件

@@ -149,6 +149,10 @@ BlEnablePaging(IN PLIST_ENTRY MemoryMappings,
BlDbgPrint(L"Exiting EFI boot services\n");
EfiSystemTable->BootServices->ExitBootServices(EfiImageHandle, MemoryMap->MapKey);
/* No runtime services should touch boot services code, so get rid of it all at this point */
EfiSystemTable->RuntimeServices->SetVirtualAddressMap(MemoryMap->MapSize, MemoryMap->DescriptorSize,
MemoryMap->DescriptorVersion, MemoryMap->Map);
/* Write PML4 to CR3 */
HlWriteCR3((UINT_PTR)*PtePointer);