]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/FspSecCore/SecFsp.h
IntelFsp2Pkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFsp2Pkg / FspSecCore / SecFsp.h
1 /** @file
2
3 Copyright (c) 2014 - 2016, 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 UINT64
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 UINT32 BootLoaderStack,
52 IN UINT8 ApiIdx
53 );
54
55
56 /**
57
58 Adjust the FSP data pointers after the stack is migrated to memory.
59
60 @param[in] OffsetGap The offset gap between the old stack and the new stack.
61
62 **/
63 VOID
64 FspDataPointerFixUp (
65 IN UINT32 OffsetGap
66 );
67
68
69 /**
70 This interface returns the base address of FSP binary.
71
72 @return FSP binary base address.
73
74 **/
75 UINT32
76 EFIAPI
77 AsmGetFspBaseAddress (
78 VOID
79 );
80
81 /**
82 This interface gets FspInfoHeader pointer
83
84 @return FSP binary base address.
85
86 **/
87 UINT32
88 EFIAPI
89 AsmGetFspInfoHeader (
90 VOID
91 );
92
93 #endif