diff options
Diffstat (limited to 'MdeModulePkg/Core/DxeIplPeim/Arm')
-rw-r--r-- | MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c index df2dc70b17..d6581a3125 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c @@ -16,6 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "DxeIpl.h"
+#include <Library/ArmLib.h>
+
/**
Transfers control to DxeCore.
@@ -43,6 +45,11 @@ HandOffToDxeCore ( BaseOfStack = AllocatePages (EFI_SIZE_TO_PAGES (STACK_SIZE));
ASSERT (BaseOfStack != NULL);
+ if (PcdGetBool (PcdSetNxForStack)) {
+ Status = ArmSetMemoryRegionNoExec ((UINTN)BaseOfStack, STACK_SIZE);
+ ASSERT_EFI_ERROR (Status);
+ }
+
//
// Compute the top of the stack we were allocated. Pre-allocate a UINTN
// for safety.
|