From: Taylor Beebe <tabe...@microsoft.com> Replace references to the memory protection PCDs to instead reference the memory protection HOB.
Signed-off-by: Taylor Beebe <t...@taylorbeebe.com> Cc: Leif Lindholm <quic_llind...@quicinc.com> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> Cc: Sami Mujawar <sami.muja...@arm.com> --- ArmPkg/ArmPkg.dsc | 1 + ArmPkg/Drivers/CpuDxe/CpuDxe.c | 5 ++--- ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc index 4939b3d59b..3d3605921f 100644 --- a/ArmPkg/ArmPkg.dsc +++ b/ArmPkg/ArmPkg.dsc @@ -57,6 +57,7 @@ PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf + DxeMemoryProtectionHobLib|MdeModulePkg/Library/MemoryProtectionHobLibNull/DxeMemoryProtectionHobLibNull.inf UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.c b/ArmPkg/Drivers/CpuDxe/CpuDxe.c index fc63e52784..6518a7130a 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.c +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.c @@ -12,6 +12,7 @@ #include <Guid/IdleLoopEvent.h> #include <Library/MemoryAllocationLib.h> +#include <Library/DxeMemoryProtectionHobLib.h> BOOLEAN mIsFlushingGCD; @@ -241,7 +242,6 @@ RemapUnusedMemoryNx ( VOID ) { - UINT64 TestBit; UINTN MemoryMapSize; UINTN MapKey; UINTN DescriptorSize; @@ -251,8 +251,7 @@ RemapUnusedMemoryNx ( EFI_MEMORY_DESCRIPTOR *MemoryMapEnd; EFI_STATUS Status; - TestBit = LShiftU64 (1, EfiBootServicesData); - if ((PcdGet64 (PcdDxeNxMemoryProtectionPolicy) & TestBit) == 0) { + if (!gDxeMps.ExecutionProtection.EnabledForType[EfiBootServicesData]) { return; } diff --git a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf index 7d8132200e..a0f94bc567 100644 --- a/ArmPkg/Drivers/CpuDxe/CpuDxe.inf +++ b/ArmPkg/Drivers/CpuDxe/CpuDxe.inf @@ -46,6 +46,7 @@ CpuExceptionHandlerLib DebugLib DefaultExceptionHandlerLib + DxeMemoryProtectionHobLib DxeServicesTableLib HobLib MemoryAllocationLib @@ -65,7 +66,6 @@ [Pcd.common] gArmTokenSpaceGuid.PcdVFPEnabled - gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy [FeaturePcd.common] gArmTokenSpaceGuid.PcdDebuggerExceptionSupport -- 2.41.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106829): https://edk2.groups.io/g/devel/message/106829 Mute This Topic: https://groups.io/mt/100090637/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-