]>
Commit | Line | Data |
---|---|---|
cf1d4549 JY |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r | |
4 | This program and the accompanying materials\r | |
5 | are licensed and made available under the terms and conditions of the BSD License\r | |
6 | which accompanies this distribution. The full text of the license may be found at\r | |
7 | http://opensource.org/licenses/bsd-license.php.\r | |
8 | \r | |
9 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
10 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
11 | \r | |
12 | **/\r | |
13 | \r | |
14 | #ifndef _SEC_FSP_H_\r | |
15 | #define _SEC_FSP_H_\r | |
16 | \r | |
17 | #include <PiPei.h>\r | |
18 | #include <FspEas.h>\r | |
19 | #include <Library/PcdLib.h>\r | |
20 | #include <Library/BaseLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | #include <Library/SerialPortLib.h>\r | |
23 | #include <Library/BaseMemoryLib.h>\r | |
24 | #include <Library/FspCommonLib.h>\r | |
25 | #include <Library/FspSecPlatformLib.h>\r | |
26 | \r | |
27 | #define FSP_MCUD_SIGNATURE SIGNATURE_32 ('M', 'C', 'U', 'D')\r | |
28 | #define FSP_PER0_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', '0')\r | |
29 | \r | |
30 | /**\r | |
31 | \r | |
32 | Calculate the FSP IDT gate descriptor.\r | |
33 | \r | |
34 | @param[in] IdtEntryTemplate IDT gate descriptor template.\r | |
35 | \r | |
36 | @return FSP specific IDT gate descriptor.\r | |
37 | \r | |
38 | **/\r | |
39 | UINT64\r | |
40 | FspGetExceptionHandler(\r | |
41 | IN UINT64 IdtEntryTemplate\r | |
42 | );\r | |
43 | \r | |
44 | /**\r | |
45 | \r | |
46 | Initialize the FSP global data region.\r | |
47 | It needs to be done as soon as possible after the stack is setup.\r | |
48 | \r | |
49 | @param[in,out] PeiFspData Pointer of the FSP global data.\r | |
50 | @param[in] BootLoaderStack BootLoader stack.\r | |
51 | @param[in] ApiIdx The index of the FSP API.\r | |
52 | \r | |
53 | **/\r | |
54 | VOID\r | |
55 | FspGlobalDataInit (\r | |
56 | IN OUT FSP_GLOBAL_DATA *PeiFspData,\r | |
57 | IN UINT32 BootLoaderStack,\r | |
58 | IN UINT8 ApiIdx\r | |
59 | );\r | |
60 | \r | |
61 | \r | |
62 | /**\r | |
63 | \r | |
64 | Adjust the FSP data pointers after the stack is migrated to memory.\r | |
65 | \r | |
66 | @param[in] OffsetGap The offset gap between the old stack and the new stack.\r | |
67 | \r | |
68 | **/\r | |
69 | VOID\r | |
70 | FspDataPointerFixUp (\r | |
71 | IN UINT32 OffsetGap\r | |
72 | );\r | |
73 | \r | |
74 | \r | |
75 | /**\r | |
76 | This interface returns the base address of FSP binary.\r | |
77 | \r | |
78 | @return FSP binary base address.\r | |
79 | \r | |
80 | **/\r | |
81 | UINT32\r | |
82 | EFIAPI\r | |
83 | AsmGetFspBaseAddress (\r | |
84 | VOID\r | |
85 | );\r | |
86 | \r | |
87 | /**\r | |
88 | This interface gets FspInfoHeader pointer\r | |
89 | \r | |
90 | @return FSP binary base address.\r | |
91 | \r | |
92 | **/\r | |
93 | UINT32\r | |
94 | EFIAPI\r | |
95 | AsmGetFspInfoHeader (\r | |
96 | VOID\r | |
97 | );\r | |
98 | \r | |
99 | #endif\r |