]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/FspSecCore/SecMain.c
IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers.
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / SecMain.c
index 7169afc6c7c0836164c3107fc684f9865e693696..c8de52e1d5f7d23d010089fd41a1c3fdf86b4ad6 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -221,6 +221,12 @@ SecTemporaryRamSupport (
   UINTN             CurrentStack;\r
   UINTN             FspStackBase;\r
 \r
+  //\r
+  // Override OnSeparateStack to 1 because this function will switch stack to permanent memory\r
+  // which makes FSP running on different stack from bootloader temporary ram stack.\r
+  //\r
+  GetFspGlobalDataPointer ()->OnSeparateStack = 1;\r
+\r
   if (PcdGet8 (PcdFspHeapSizePercentage) == 0) {\r
 \r
     CurrentStack = AsmReadEsp();\r