X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=IntelFsp2Pkg%2FFspSecCore%2FSecFsp.c;fp=IntelFsp2Pkg%2FFspSecCore%2FSecFsp.c;h=216f7bb6c5eca797f888a3aa790d407d91b4d03f;hp=446d1730e958ce09feab37641d264e1107e37a1f;hb=f2cdb268ef04eeec51948b5d81eeca5cab5ed9af;hpb=ceacd9e992cd12f3c07ae1a28a75a6b8750718aa
diff --git a/IntelFsp2Pkg/FspSecCore/SecFsp.c b/IntelFsp2Pkg/FspSecCore/SecFsp.c
index 446d1730e9..216f7bb6c5 100644
--- a/IntelFsp2Pkg/FspSecCore/SecFsp.c
+++ b/IntelFsp2Pkg/FspSecCore/SecFsp.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -160,6 +160,16 @@ FspGlobalDataInit (
SetFspMemoryInitUpdDataPointer (FspmUpdDataPtr);
SetFspSiliconInitUpdDataPointer (NULL);
+ //
+ // Initialize OnSeparateStack value.
+ //
+ if (PcdGet8 (PcdFspHeapSizePercentage) != 0) {
+ //
+ // FSP is running on its own stack and may need switching stack when calling bootloader functions.
+ //
+ GetFspGlobalDataPointer ()->OnSeparateStack = 1;
+ }
+
//
// Initialize serial port
// It might have been done in ProcessLibraryConstructorList(), however,