]>
Commit | Line | Data |
---|---|---|
cf1d4549 JY |
1 | /** @file\r |
2 | \r | |
630df8c8 | 3 | Copyright (c) 2014 - 2022, 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 _SEC_FSP_H_\r | |
9 | #define _SEC_FSP_H_\r | |
10 | \r | |
11 | #include <PiPei.h>\r | |
12 | #include <FspEas.h>\r | |
13 | #include <Library/PcdLib.h>\r | |
14 | #include <Library/BaseLib.h>\r | |
15 | #include <Library/DebugLib.h>\r | |
16 | #include <Library/SerialPortLib.h>\r | |
17 | #include <Library/BaseMemoryLib.h>\r | |
18 | #include <Library/FspCommonLib.h>\r | |
19 | #include <Library/FspSecPlatformLib.h>\r | |
20 | \r | |
21 | #define FSP_MCUD_SIGNATURE SIGNATURE_32 ('M', 'C', 'U', 'D')\r | |
22 | #define FSP_PER0_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', '0')\r | |
23 | \r | |
24 | /**\r | |
25 | \r | |
26 | Calculate the FSP IDT gate descriptor.\r | |
27 | \r | |
28 | @param[in] IdtEntryTemplate IDT gate descriptor template.\r | |
29 | \r | |
30 | @return FSP specific IDT gate descriptor.\r | |
31 | \r | |
32 | **/\r | |
470206ba | 33 | IA32_IDT_GATE_DESCRIPTOR\r |
111f2228 | 34 | FspGetExceptionHandler (\r |
cf1d4549 JY |
35 | IN UINT64 IdtEntryTemplate\r |
36 | );\r | |
37 | \r | |
38 | /**\r | |
39 | \r | |
40 | Initialize the FSP global data region.\r | |
41 | It needs to be done as soon as possible after the stack is setup.\r | |
42 | \r | |
43 | @param[in,out] PeiFspData Pointer of the FSP global data.\r | |
44 | @param[in] BootLoaderStack BootLoader stack.\r | |
45 | @param[in] ApiIdx The index of the FSP API.\r | |
46 | \r | |
47 | **/\r | |
48 | VOID\r | |
49 | FspGlobalDataInit (\r | |
111f2228 | 50 | IN OUT FSP_GLOBAL_DATA *PeiFspData,\r |
630df8c8 | 51 | IN UINTN BootLoaderStack,\r |
111f2228 | 52 | IN UINT8 ApiIdx\r |
cf1d4549 JY |
53 | );\r |
54 | \r | |
cf1d4549 JY |
55 | /**\r |
56 | \r | |
57 | Adjust the FSP data pointers after the stack is migrated to memory.\r | |
58 | \r | |
59 | @param[in] OffsetGap The offset gap between the old stack and the new stack.\r | |
60 | \r | |
61 | **/\r | |
62 | VOID\r | |
63 | FspDataPointerFixUp (\r | |
ec0b5484 | 64 | IN UINTN OffsetGap\r |
cf1d4549 JY |
65 | );\r |
66 | \r | |
cf1d4549 JY |
67 | /**\r |
68 | This interface returns the base address of FSP binary.\r | |
69 | \r | |
70 | @return FSP binary base address.\r | |
71 | \r | |
72 | **/\r | |
c46204e2 | 73 | UINTN\r |
cf1d4549 JY |
74 | EFIAPI\r |
75 | AsmGetFspBaseAddress (\r | |
76 | VOID\r | |
77 | );\r | |
78 | \r | |
79 | /**\r | |
80 | This interface gets FspInfoHeader pointer\r | |
81 | \r | |
82 | @return FSP binary base address.\r | |
83 | \r | |
84 | **/\r | |
c46204e2 | 85 | UINTN\r |
cf1d4549 JY |
86 | EFIAPI\r |
87 | AsmGetFspInfoHeader (\r | |
88 | VOID\r | |
89 | );\r | |
90 | \r | |
91 | #endif\r |