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