diff --git a/ArmPkg/Library/OpteeLib/Optee.c b/ArmPkg/Library/OpteeLib/Optee.c index 46464f17ef..3acf172b68 100644 --- a/ArmPkg/Library/OpteeLib/Optee.c +++ b/ArmPkg/Library/OpteeLib/Optee.c @@ -86,7 +86,12 @@ OpteeSharedMemoryRemap ( return EFI_BUFFER_TOO_SMALL; } - Status = ArmSetMemoryAttributes (PhysicalAddress, Size, EFI_MEMORY_WB, 0); + Status = ArmSetMemoryAttributes ( + PhysicalAddress, + Size, + EFI_MEMORY_WB | EFI_MEMORY_XP, + 0 + ); if (EFI_ERROR (Status)) { return Status; }