diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 83f49d7c00..0a1f3d79e2 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -256,6 +256,14 @@ DxeMain ( Status = InitializeCpuExceptionHandlers (VectorInfoList); ASSERT_EFI_ERROR (Status); + // + // Setup Stack Guard + // + if (PcdGetBool (PcdCpuStackGuard)) { + Status = InitializeSeparateExceptionStacks (NULL); + ASSERT_EFI_ERROR (Status); + } + // // Initialize Debug Agent to support source level debug in DXE phase //