]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/FspSecCore/SecFsp.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / SecFsp.h
1 /** @file
2
3 Copyright (c) 2014 - 2022, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6 **/
7
8 #ifndef _SEC_FSP_H_
9 #define _SEC_FSP_H_
10
11 #include <PiPei.h>
12 #include <FspEas.h>
13 #include <Library/PcdLib.h>
14 #include <Library/BaseLib.h>
15 #include <Library/DebugLib.h>
16 #include <Library/SerialPortLib.h>
17 #include <Library/BaseMemoryLib.h>
18 #include <Library/FspCommonLib.h>
19 #include <Library/FspSecPlatformLib.h>
20
21 #define FSP_MCUD_SIGNATURE SIGNATURE_32 ('M', 'C', 'U', 'D')
22 #define FSP_PER0_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', '0')
23
24 /**
25
26 Calculate the FSP IDT gate descriptor.
27
28 @param[in] IdtEntryTemplate IDT gate descriptor template.
29
30 @return FSP specific IDT gate descriptor.
31
32 **/
33 IA32_IDT_GATE_DESCRIPTOR
34 FspGetExceptionHandler (
35 IN UINT64 IdtEntryTemplate
36 );
37
38 /**
39
40 Initialize the FSP global data region.
41 It needs to be done as soon as possible after the stack is setup.
42
43 @param[in,out] PeiFspData Pointer of the FSP global data.
44 @param[in] BootLoaderStack BootLoader stack.
45 @param[in] ApiIdx The index of the FSP API.
46
47 **/
48 VOID
49 FspGlobalDataInit (
50 IN OUT FSP_GLOBAL_DATA *PeiFspData,
51 IN UINTN BootLoaderStack,
52 IN UINT8 ApiIdx
53 );
54
55 /**
56
57 Adjust the FSP data pointers after the stack is migrated to memory.
58
59 @param[in] OffsetGap The offset gap between the old stack and the new stack.
60
61 **/
62 VOID
63 FspDataPointerFixUp (
64 IN UINTN OffsetGap
65 );
66
67 /**
68 This interface returns the base address of FSP binary.
69
70 @return FSP binary base address.
71
72 **/
73 UINT32
74 EFIAPI
75 AsmGetFspBaseAddress (
76 VOID
77 );
78
79 /**
80 This interface gets FspInfoHeader pointer
81
82 @return FSP binary base address.
83
84 **/
85 UINT32
86 EFIAPI
87 AsmGetFspInfoHeader (
88 VOID
89 );
90
91 #endif