summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/Library/BaseFspSwitchStackLib
diff options
context:
space:
mode:
authorTed Kuo <ted.kuo@intel.com>2022-04-15 01:37:39 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-04-16 00:18:14 +0000
commit00aa71ce20472f0a7bc01e735a0c419adf727def (patch)
treea0b26a7b9be95b42b9f73c6e456893b760123c58 /IntelFsp2Pkg/Library/BaseFspSwitchStackLib
parentd40965b9877135028673884abc8f5a9b6b0ef5dc (diff)
downloadedk2-00aa71ce20472f0a7bc01e735a0c419adf727def.tar.gz
edk2-00aa71ce20472f0a7bc01e735a0c419adf727def.tar.bz2
edk2-00aa71ce20472f0a7bc01e735a0c419adf727def.zip
IntelFsp2Pkg: FspSecCore support for X64
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3893 1.Added FspSecCore support for X64. 2.Bumped FSP header revision to 7 to indicate FSP 64bit is supported. 3.Corrected few typos. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Ashraf Ali S <ashraf.ali.s@intel.com> Signed-off-by: Ted Kuo <ted.kuo@intel.com> Reviewed-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Diffstat (limited to 'IntelFsp2Pkg/Library/BaseFspSwitchStackLib')
-rw-r--r--IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64/Stack.nasm5
1 files changed, 3 insertions, 2 deletions
diff --git a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64/Stack.nasm b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64/Stack.nasm
index bd36fe4b8b..1ea1220608 100644
--- a/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64/Stack.nasm
+++ b/IntelFsp2Pkg/Library/BaseFspSwitchStackLib/X64/Stack.nasm
@@ -47,7 +47,8 @@ ASM_PFX(Loader2PeiSwitchStack):
;------------------------------------------------------------------------------
global ASM_PFX(FspSwitchStack)
ASM_PFX(FspSwitchStack):
- ; Save current contexts
+ ; Save current contexts. The format must align with CONTEXT_STACK_64.
+ push rdx ; Reserved QWORD for stack alignment
push rdx ; ApiParam2
push rcx ; ApiParam1
push rax ; FspInfoHeader
@@ -67,6 +68,6 @@ ASM_PFX(FspSwitchStack):
add rsp, 16
POPA_64
popfq
- add rsp, 24 ; FspInfoHeader + ApiParam[2]
+ add rsp, 32 ; FspInfoHeader + ApiParam[2] + Reserved QWORD
ret