提交 bb8bd5de 编写于 作者: V vit9696

OcAppleBootCompatLib: Update memory attributes before StartImage as well

上级 ffb49563
......@@ -447,6 +447,8 @@ OcStartImage (
BOOT_COMPAT_CONTEXT *BootCompat;
OC_FWRT_CONFIG Config;
UINTN DataSize;
EFI_PHYSICAL_ADDRESS Address;
UINTN Pages;
BootCompat = GetBootCompatContext ();
AppleLoadedImage = OcGetAppleBootLoadedImage (ImageHandle);
......@@ -462,6 +464,14 @@ OcStartImage (
gBS->CalculateCrc32 (gBS, gBS->Hdr.HeaderSize, &gBS->Hdr.CRC32);
}
if (BootCompat->Settings.SyncRuntimePermissions && BootCompat->ServiceState.FwRuntime != NULL) {
Status = BootCompat->ServiceState.FwRuntime->GetExecArea (&Address, &Pages);
if (!EFI_ERROR (Status)) {
OcUpdateAttributes (Address, EfiRuntimeServicesCode, EFI_MEMORY_RO, EFI_MEMORY_XP);
}
}
//
// Clear monitoring vars
//
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册