]>
Commit | Line | Data |
---|---|---|
cf1d4549 JY |
1 | /** @file\r |
2 | \r | |
e37bb20c | 3 | Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>\r |
cf1d4549 JY |
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 first parameter passed by the bootlaoder.\r | |
44 | \r | |
45 | @retval ApiParameter FSP API first parameter 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 gets back the FSP API second parameter passed by the bootlaoder.\r | |
55 | \r | |
56 | @retval ApiParameter FSP API second parameter passed by the bootlaoder.\r | |
57 | **/\r | |
58 | UINT32\r | |
59 | EFIAPI\r | |
60 | GetFspApiParameter2 (\r | |
61 | VOID\r | |
62 | );\r | |
63 | \r | |
64 | /**\r | |
65 | This function sets the FSP API parameter in the stack.\r | |
66 | \r | |
67 | @param[in] Value New parameter value.\r | |
68 | \r | |
69 | **/\r | |
70 | VOID\r | |
71 | EFIAPI\r | |
72 | SetFspApiParameter (\r | |
73 | IN UINT32 Value\r | |
74 | );\r | |
75 | \r | |
76 | /**\r | |
77 | This function set the API status code returned to the BootLoader.\r | |
78 | \r | |
79 | @param[in] ReturnStatus Status code to return.\r | |
80 | \r | |
81 | **/\r | |
82 | VOID\r | |
83 | EFIAPI\r | |
84 | SetFspApiReturnStatus (\r | |
85 | IN UINT32 ReturnStatus\r | |
86 | );\r | |
87 | \r | |
88 | /**\r | |
89 | This function sets the context switching stack to a new stack frame.\r | |
90 | \r | |
91 | @param[in] NewStackTop New core stack to be set.\r | |
92 | \r | |
93 | **/\r | |
94 | VOID\r | |
95 | EFIAPI\r | |
96 | SetFspCoreStackPointer (\r | |
97 | IN VOID *NewStackTop\r | |
98 | );\r | |
99 | \r | |
100 | /**\r | |
101 | This function sets the platform specific data pointer.\r | |
102 | \r | |
103 | @param[in] PlatformData Fsp platform specific data pointer.\r | |
104 | \r | |
105 | **/\r | |
106 | VOID\r | |
107 | EFIAPI\r | |
108 | SetFspPlatformDataPointer (\r | |
109 | IN VOID *PlatformData\r | |
110 | );\r | |
111 | \r | |
112 | /**\r | |
113 | This function gets the platform specific data pointer.\r | |
114 | \r | |
115 | @param[in] PlatformData Fsp platform specific data pointer.\r | |
116 | \r | |
117 | **/\r | |
118 | VOID *\r | |
119 | EFIAPI\r | |
120 | GetFspPlatformDataPointer (\r | |
121 | VOID\r | |
122 | );\r | |
123 | \r | |
124 | /**\r | |
125 | This function sets the UPD data pointer.\r | |
126 | \r | |
127 | @param[in] UpdDataPtr UPD data pointer.\r | |
128 | **/\r | |
129 | VOID\r | |
130 | EFIAPI\r | |
131 | SetFspUpdDataPointer (\r | |
132 | IN VOID *UpdDataPtr\r | |
133 | );\r | |
134 | \r | |
135 | /**\r | |
136 | This function gets the UPD data pointer.\r | |
137 | \r | |
138 | @return UpdDataPtr UPD data pointer.\r | |
139 | **/\r | |
140 | VOID *\r | |
141 | EFIAPI\r | |
142 | GetFspUpdDataPointer (\r | |
143 | VOID\r | |
144 | );\r | |
145 | \r | |
146 | /**\r | |
147 | This function sets the memory init UPD data pointer.\r | |
148 | \r | |
149 | @param[in] MemoryInitUpdPtr memory init UPD data pointer.\r | |
150 | **/\r | |
151 | VOID\r | |
152 | EFIAPI\r | |
153 | SetFspMemoryInitUpdDataPointer (\r | |
154 | IN VOID *MemoryInitUpdPtr\r | |
155 | );\r | |
156 | \r | |
157 | /**\r | |
158 | This function gets the memory init UPD data pointer.\r | |
159 | \r | |
160 | @return memory init UPD data pointer.\r | |
161 | **/\r | |
162 | VOID *\r | |
163 | EFIAPI\r | |
164 | GetFspMemoryInitUpdDataPointer (\r | |
165 | VOID\r | |
166 | );\r | |
167 | \r | |
168 | /**\r | |
169 | This function sets the silicon init UPD data pointer.\r | |
170 | \r | |
171 | @param[in] SiliconInitUpdPtr silicon init UPD data pointer.\r | |
172 | **/\r | |
173 | VOID\r | |
174 | EFIAPI\r | |
175 | SetFspSiliconInitUpdDataPointer (\r | |
176 | IN VOID *SiliconInitUpdPtr\r | |
177 | );\r | |
178 | \r | |
179 | /**\r | |
180 | This function gets the silicon init UPD data pointer.\r | |
181 | \r | |
182 | @return silicon init UPD data pointer.\r | |
183 | **/\r | |
184 | VOID *\r | |
185 | EFIAPI\r | |
186 | GetFspSiliconInitUpdDataPointer (\r | |
187 | VOID\r | |
188 | );\r | |
189 | \r | |
190 | /**\r | |
191 | Set FSP measurement point timestamp.\r | |
192 | \r | |
193 | @param[in] Id Measurement point ID.\r | |
194 | \r | |
195 | @return performance timestamp.\r | |
196 | **/\r | |
197 | UINT64\r | |
198 | EFIAPI\r | |
199 | SetFspMeasurePoint (\r | |
200 | IN UINT8 Id\r | |
201 | );\r | |
202 | \r | |
203 | /**\r | |
204 | This function gets the FSP info header pointer.\r | |
205 | \r | |
206 | @retval FspInfoHeader FSP info header pointer\r | |
207 | **/\r | |
208 | FSP_INFO_HEADER *\r | |
209 | EFIAPI\r | |
210 | GetFspInfoHeader (\r | |
211 | VOID\r | |
212 | );\r | |
213 | \r | |
214 | /**\r | |
215 | This function sets the FSP info header pointer.\r | |
216 | \r | |
217 | @param[in] FspInfoHeader FSP info header pointer\r | |
218 | **/\r | |
219 | VOID\r | |
220 | EFIAPI\r | |
221 | SetFspInfoHeader (\r | |
222 | FSP_INFO_HEADER *FspInfoHeader\r | |
223 | );\r | |
224 | \r | |
225 | /**\r | |
226 | This function gets the FSP info header pointer from the API context.\r | |
227 | \r | |
228 | @retval FspInfoHeader FSP info header pointer\r | |
229 | **/\r | |
230 | FSP_INFO_HEADER *\r | |
231 | EFIAPI\r | |
232 | GetFspInfoHeaderFromApiContext (\r | |
233 | VOID\r | |
234 | );\r | |
235 | \r | |
236 | /**\r | |
cc0b456a | 237 | This function gets the CfgRegion data pointer.\r |
cf1d4549 | 238 | \r |
cc0b456a | 239 | @return CfgRegion data pointer.\r |
cf1d4549 JY |
240 | **/\r |
241 | VOID *\r | |
242 | EFIAPI\r | |
cc0b456a | 243 | GetFspCfgRegionDataPointer (\r |
cf1d4549 JY |
244 | VOID\r |
245 | );\r | |
246 | \r | |
247 | /**\r | |
248 | This function gets FSP API calling mode.\r | |
249 | \r | |
250 | @retval API calling mode\r | |
251 | **/\r | |
252 | UINT8\r | |
253 | EFIAPI\r | |
254 | GetFspApiCallingIndex (\r | |
255 | VOID\r | |
256 | );\r | |
257 | \r | |
258 | /**\r | |
259 | This function sets FSP API calling mode.\r | |
260 | \r | |
261 | @param[in] Index API calling index\r | |
262 | **/\r | |
263 | VOID\r | |
264 | EFIAPI\r | |
265 | SetFspApiCallingIndex (\r | |
266 | UINT8 Index\r | |
267 | );\r | |
268 | \r | |
269 | /**\r | |
270 | This function gets FSP Phase StatusCode.\r | |
e37bb20c | 271 | \r |
cf1d4549 JY |
272 | @retval StatusCode\r |
273 | **/\r | |
274 | UINT32\r | |
275 | EFIAPI\r | |
276 | GetPhaseStatusCode (\r | |
277 | VOID\r | |
278 | );\r | |
279 | \r | |
280 | \r | |
281 | /**\r | |
282 | This function sets FSP Phase StatusCode.\r | |
283 | \r | |
284 | @param[in] Mode Phase StatusCode\r | |
285 | **/\r | |
286 | VOID\r | |
287 | EFIAPI\r | |
288 | SetPhaseStatusCode (\r | |
289 | UINT32 StatusCode\r | |
290 | );\r | |
291 | \r | |
6b5677e1 YS |
292 | /**\r |
293 | This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.\r | |
294 | \r | |
295 | @param[in] FspResetType Reset type that needs to returned as API return status\r | |
296 | \r | |
297 | **/\r | |
298 | VOID\r | |
299 | EFIAPI\r | |
300 | FspApiReturnStatusReset (\r | |
301 | IN UINT32 FspResetType\r | |
302 | );\r | |
cf1d4549 | 303 | #endif\r |