]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFsp2Pkg/FspSecCore/SecFsp.c
IntelFsp2Pkg: Support Multi-Phase SiInit and debug handlers.
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / SecFsp.c
index 446d1730e958ce09feab37641d264e1107e37a1f..216f7bb6c5eca797f888a3aa790d407d91b4d03f 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
 /** @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
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
@@ -160,6 +160,16 @@ FspGlobalDataInit (
   SetFspMemoryInitUpdDataPointer (FspmUpdDataPtr);\r
   SetFspSiliconInitUpdDataPointer (NULL);\r
 \r
   SetFspMemoryInitUpdDataPointer (FspmUpdDataPtr);\r
   SetFspSiliconInitUpdDataPointer (NULL);\r
 \r
+  //\r
+  // Initialize OnSeparateStack value.\r
+  //\r
+  if (PcdGet8 (PcdFspHeapSizePercentage) != 0) {\r
+    //\r
+    // FSP is running on its own stack and may need switching stack when calling bootloader functions.\r
+    //\r
+    GetFspGlobalDataPointer ()->OnSeparateStack = 1;\r
+  }\r
+\r
   //\r
   // Initialize serial port\r
   // It might have been done in ProcessLibraryConstructorList(), however,\r
   //\r
   // Initialize serial port\r
   // It might have been done in ProcessLibraryConstructorList(), however,\r