]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | \r | |
3 | Copyright (c) 2014 - 2015, 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 _FSP_COMMON_LIB_H_\r | |
15 | #define _FSP_COMMON_LIB_H_\r | |
16 | \r | |
17 | #include <FspGlobalData.h>\r | |
18 | #include <FspMeasurePointId.h>\r | |
19 | \r | |
20 | /**\r | |
21 | This function sets the FSP global data pointer.\r | |
22 | \r | |
23 | @param[in] FspData Fsp global data pointer.\r | |
24 | \r | |
25 | **/\r | |
26 | VOID\r | |
27 | EFIAPI\r | |
28 | SetFspGlobalDataPointer (\r | |
29 | IN FSP_GLOBAL_DATA *FspData\r | |
30 | );\r | |
31 | \r | |
32 | /**\r | |
33 | This function gets the FSP global data pointer.\r | |
34 | \r | |
35 | **/\r | |
36 | FSP_GLOBAL_DATA *\r | |
37 | EFIAPI\r | |
38 | GetFspGlobalDataPointer (\r | |
39 | VOID\r | |
40 | );\r | |
41 | \r | |
42 | /**\r | |
43 | This function gets back the FSP API paramter passed by the bootlaoder.\r | |
44 | \r | |
45 | @retval ApiParameter FSP API paramter passed by the bootlaoder.\r | |
46 | **/\r | |
47 | UINT32\r | |
48 | EFIAPI\r | |
49 | GetFspApiParameter (\r | |
50 | VOID\r | |
51 | );\r | |
52 | \r | |
53 | /**\r | |
54 | This function sets the FSP API paramter in the stack.\r | |
55 | \r | |
56 | @param[in] Value New parameter value.\r | |
57 | \r | |
58 | **/\r | |
59 | VOID\r | |
60 | EFIAPI\r | |
61 | SetFspApiParameter (\r | |
62 | IN UINT32 Value\r | |
63 | );\r | |
64 | \r | |
65 | /**\r | |
66 | This function sets the FSP continuation function parameters in the stack.\r | |
67 | \r | |
68 | @param[in] Value New parameter value to set.\r | |
69 | @param[in] Index Parameter index.\r | |
70 | **/\r | |
71 | VOID\r | |
72 | EFIAPI\r | |
73 | SetFspContinuationFuncParameter (\r | |
74 | IN UINT32 Value,\r | |
75 | IN UINT32 Index\r | |
76 | );\r | |
77 | \r | |
78 | /**\r | |
79 | This function changes the Bootloader return address in stack.\r | |
80 | \r | |
81 | @param[in] ReturnAddress Address to return.\r | |
82 | \r | |
83 | **/\r | |
84 | VOID\r | |
85 | EFIAPI\r | |
86 | SetFspApiReturnAddress (\r | |
87 | IN UINT32 ReturnAddress\r | |
88 | );\r | |
89 | \r | |
90 | /**\r | |
91 | This function set the API status code returned to the bootloader.\r | |
92 | \r | |
93 | @param[in] ReturnStatus Status code to return.\r | |
94 | \r | |
95 | **/\r | |
96 | VOID\r | |
97 | EFIAPI\r | |
98 | SetFspApiReturnStatus (\r | |
99 | IN UINT32 ReturnStatus\r | |
100 | );\r | |
101 | \r | |
102 | /**\r | |
103 | This function sets the context switching stack to a new stack frame.\r | |
104 | \r | |
105 | @param[in] NewStackTop New core stack to be set.\r | |
106 | \r | |
107 | **/\r | |
108 | VOID\r | |
109 | EFIAPI\r | |
110 | SetFspCoreStackPointer (\r | |
111 | IN VOID *NewStackTop\r | |
112 | );\r | |
113 | \r | |
114 | /**\r | |
115 | This function sets the platform specific data pointer.\r | |
116 | \r | |
117 | @param[in] PlatformData Fsp platform specific data pointer.\r | |
118 | \r | |
119 | **/\r | |
120 | VOID\r | |
121 | EFIAPI\r | |
122 | SetFspPlatformDataPointer (\r | |
123 | IN VOID *PlatformData\r | |
124 | );\r | |
125 | \r | |
126 | /**\r | |
127 | This function gets the platform specific data pointer.\r | |
128 | \r | |
129 | @param[in] PlatformData Fsp platform specific data pointer.\r | |
130 | \r | |
131 | **/\r | |
132 | VOID *\r | |
133 | EFIAPI\r | |
134 | GetFspPlatformDataPointer (\r | |
135 | VOID\r | |
136 | );\r | |
137 | \r | |
138 | /**\r | |
139 | This function sets the UPD data pointer.\r | |
140 | \r | |
141 | @param[in] UpdDataRgnPtr UPD data pointer.\r | |
142 | **/\r | |
143 | VOID\r | |
144 | EFIAPI\r | |
145 | SetFspUpdDataPointer (\r | |
146 | IN VOID *UpdDataRgnPtr\r | |
147 | );\r | |
148 | \r | |
149 | /**\r | |
150 | This function gets the UPD data pointer.\r | |
151 | \r | |
152 | @return UpdDataRgnPtr UPD data pointer.\r | |
153 | **/\r | |
154 | VOID *\r | |
155 | EFIAPI\r | |
156 | GetFspUpdDataPointer (\r | |
157 | VOID\r | |
158 | );\r | |
159 | \r | |
160 | /**\r | |
161 | Set FSP measurement point timestamp.\r | |
162 | \r | |
163 | @param[in] Id Measurement point ID.\r | |
164 | \r | |
165 | @return performance timestamp.\r | |
166 | **/\r | |
167 | UINT64\r | |
168 | EFIAPI\r | |
169 | SetFspMeasurePoint (\r | |
170 | IN UINT8 Id\r | |
171 | );\r | |
172 | \r | |
173 | /**\r | |
174 | This function gets the FSP info header pointer.\r | |
175 | \r | |
176 | @retval FspInfoHeader FSP info header pointer\r | |
177 | **/\r | |
178 | FSP_INFO_HEADER *\r | |
179 | EFIAPI\r | |
180 | GetFspInfoHeader (\r | |
181 | VOID\r | |
182 | );\r | |
183 | \r | |
184 | /**\r | |
185 | This function gets FSP API calling mode.\r | |
186 | \r | |
187 | @retval API calling mode\r | |
188 | **/\r | |
189 | UINT8\r | |
190 | EFIAPI\r | |
191 | GetFspApiCallingMode (\r | |
192 | VOID\r | |
193 | );\r | |
194 | \r | |
195 | /**\r | |
196 | This function sets FSP API calling mode.\r | |
197 | \r | |
198 | @param[in] Mode API calling mode\r | |
199 | **/\r | |
200 | VOID\r | |
201 | EFIAPI\r | |
202 | SetFspApiCallingMode (\r | |
203 | UINT8 Mode\r | |
204 | );\r | |
205 | \r | |
206 | #endif\r |