blob: d2a737a4f0ae7fbc2596dde5b5aad2c71d1d27c7 [file] [log] [blame]
Ronak Kanabar1ae366f2023-06-07 01:21:56 +05301/** @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**/
33EFI_STATUS
34EFIAPI
35Pei2LoaderSwitchStack (
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**/
49EFI_STATUS
50EFIAPI
51Loader2PeiSwitchStack (
52 VOID
53 );
54
55#endif