提交 9c609e5c 编写于 作者: V vit9696

OcAppleBootCompatLib: Add comments about MAT issues

上级 2f5ba7ac
......@@ -55,6 +55,13 @@ FixRuntimeAttributes (
}
if (BootCompat->Settings.SyncRuntimePermissions && BootCompat->ServiceState.FwRuntime != NULL) {
//
// Some firmwares do not update MAT after loading runtime drivers after EndOfDxe.
// Since the memory used to allocate runtime driver resides in BINs, MAT has whatever
// permissions designated for unused memory. Mark unused memory containing our driver
// as executable here.
// REF: https://github.com/acidanthera/bugtracker/issues/491#issuecomment-606835337
//
Status = BootCompat->ServiceState.FwRuntime->GetExecArea (&Address, &Pages);
if (!EFI_ERROR (Status)) {
......@@ -438,6 +445,10 @@ OcGetMemoryMap (
}
if (BootCompat->Settings.SyncRuntimePermissions && BootCompat->ServiceState.FwRuntime != NULL) {
//
// Some firmwares mark runtime drivers loaded after EndOfDxe as EfiRuntimeServicesData:
// REF: https://github.com/acidanthera/bugtracker/issues/791#issuecomment-607935508
//
Status2 = BootCompat->ServiceState.FwRuntime->GetExecArea (&Address, &Pages);
if (!EFI_ERROR (Status2)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册