Skip to content

Commit

Permalink
Ring3: Small fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Feb 22, 2024
1 parent b9aa237 commit 031adc2
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions MdeModulePkg/Core/Dxe/SysCall/SupportedProtocols.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,26 @@ GoToRing3 (
VA_END (Marker);
EnableSMAP ();

//
// Necessary fix for ProcessLibraryConstructorList() -> DxeCcProbeLibConstructor()
//
SetUefiImageMemoryAttributes (
FixedPcdGet32 (PcdOvmfWorkAreaBase),
FixedPcdGet32 (PcdOvmfWorkAreaSize),
EFI_MEMORY_XP | EFI_MEMORY_USER
);
if (Number == 2) {
//
// Necessary fix for ProcessLibraryConstructorList() -> DxeCcProbeLibConstructor()
//
SetUefiImageMemoryAttributes (
FixedPcdGet32 (PcdOvmfWorkAreaBase),
FixedPcdGet32 (PcdOvmfWorkAreaSize),
EFI_MEMORY_XP | EFI_MEMORY_USER
);
}

Status = CallRing3 (Input);

SetUefiImageMemoryAttributes (
FixedPcdGet32 (PcdOvmfWorkAreaBase),
FixedPcdGet32 (PcdOvmfWorkAreaSize),
EFI_MEMORY_XP
);
if (Number == 2) {
SetUefiImageMemoryAttributes (
FixedPcdGet32 (PcdOvmfWorkAreaBase),
FixedPcdGet32 (PcdOvmfWorkAreaSize),
EFI_MEMORY_XP
);
}

return Status;
}
Expand Down

0 comments on commit 031adc2

Please sign in to comment.