summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
diff options
context:
space:
mode:
authorChasel Chiu <chasel.chiu@intel.com>2020-05-20 11:23:13 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2020-05-21 01:25:26 +0000
commit3f89db869028fa65a37756fd7f391cbd69f4579c (patch)
treebfa326e39831ce46cda58d83b01cbbc33f01c917 /IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
parentbc5012b8fbf9f769a62d8a7a2dbf04343c16d398 (diff)
downloadedk2-3f89db869028fa65a37756fd7f391cbd69f4579c.tar.gz
edk2-3f89db869028fa65a37756fd7f391cbd69f4579c.tar.bz2
edk2-3f89db869028fa65a37756fd7f391cbd69f4579c.zip
IntelFsp2Pkg: Add FunctionParametePtr to FspGlobalData.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2726 When FSP switching stack and calling bootloader functions, the function parameter in stack may not be accessible easily. We can store the function parameter pointer to FspGlobalData and retrieve it after stack switched. Also need to add Loader2PeiSwitchStack () to header file as public function for platform FSP code to consume. Cc: Maurice Ma <maurice.ma@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Diffstat (limited to 'IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h')
-rw-r--r--IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
index 0c76e9f022..f049361d78 100644
--- a/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
+++ b/IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@@ -36,4 +36,20 @@ Pei2LoaderSwitchStack (
VOID
);
+/**
+
+ This function is equivalent to Pei2LoaderSwitchStack () but just indicates
+ the stack after switched is FSP stack.
+
+ @return ReturnKey After switching to the saved stack,
+ this value will be saved in eax before returning.
+
+
+**/
+UINT32
+EFIAPI
+Loader2PeiSwitchStack (
+ VOID
+ );
+
#endif