]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Include/Library/FspSwitchStackLib.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2Pkg / Include / Library / FspSwitchStackLib.h
1 /** @file
2
3 Copyright (c) 2014 - 2020, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6 **/
7
8 #ifndef _FSP_SWITCH_STACK_LIB_H_
9 #define _FSP_SWITCH_STACK_LIB_H_
10
11 /**
12
13 This function will switch the current stack to the previous saved stack.
14 Before calling the previous stack has to be set in FSP_GLOBAL_DATA.CoreStack.
15 EIP
16 FLAGS 16 bit FLAGS 16 bit
17 EDI
18 ESI
19 EBP
20 ESP
21 EBX
22 EDX
23 ECX
24 EAX
25 DWORD IDT base1
26 StackPointer: DWORD IDT base2
27
28 @return ReturnKey After switching to the saved stack,
29 this value will be saved in eax before returning.
30
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 Pei2LoaderSwitchStack (
36 VOID
37 );
38
39 /**
40
41 This function is equivalent to Pei2LoaderSwitchStack () but just indicates
42 the stack after switched is FSP stack.
43
44 @return ReturnKey After switching to the saved stack,
45 this value will be saved in eax before returning.
46
47
48 **/
49 EFI_STATUS
50 EFIAPI
51 Loader2PeiSwitchStack (
52 VOID
53 );
54
55 #endif