]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFsp2Pkg/Include/Library/FspCommonLib.h
IntelFsp2Pkg-BaseFspCommonLib: Add funtion to return the reset required status
[mirror_edk2.git] / IntelFsp2Pkg / Include / Library / FspCommonLib.h
CommitLineData
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 _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
26VOID\r
27EFIAPI\r
28SetFspGlobalDataPointer (\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
36FSP_GLOBAL_DATA *\r
37EFIAPI\r
38GetFspGlobalDataPointer (\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
47UINT32\r
48EFIAPI\r
49GetFspApiParameter (\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
58UINT32\r
59EFIAPI\r
60GetFspApiParameter2 (\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
70VOID\r
71EFIAPI\r
72SetFspApiParameter (\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
82VOID\r
83EFIAPI\r
84SetFspApiReturnStatus (\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
94VOID\r
95EFIAPI\r
96SetFspCoreStackPointer (\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
106VOID\r
107EFIAPI\r
108SetFspPlatformDataPointer (\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
118VOID *\r
119EFIAPI\r
120GetFspPlatformDataPointer (\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
129VOID\r
130EFIAPI\r
131SetFspUpdDataPointer (\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
140VOID *\r
141EFIAPI\r
142GetFspUpdDataPointer (\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
151VOID\r
152EFIAPI\r
153SetFspMemoryInitUpdDataPointer (\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
162VOID *\r
163EFIAPI\r
164GetFspMemoryInitUpdDataPointer (\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
173VOID\r
174EFIAPI\r
175SetFspSiliconInitUpdDataPointer (\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
184VOID *\r
185EFIAPI\r
186GetFspSiliconInitUpdDataPointer (\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
197UINT64\r
198EFIAPI\r
199SetFspMeasurePoint (\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
208FSP_INFO_HEADER *\r
209EFIAPI\r
210GetFspInfoHeader (\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
219VOID\r
220EFIAPI\r
221SetFspInfoHeader (\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
230FSP_INFO_HEADER *\r
231EFIAPI\r
232GetFspInfoHeaderFromApiContext (\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
241VOID *\r
242EFIAPI\r
cc0b456a 243GetFspCfgRegionDataPointer (\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
252UINT8\r
253EFIAPI\r
254GetFspApiCallingIndex (\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
263VOID\r
264EFIAPI\r
265SetFspApiCallingIndex (\r
266 UINT8 Index\r
267 );\r
268\r
269/**\r
270 This function gets FSP Phase StatusCode.\r
271 \r
272 @retval StatusCode\r
273**/\r
274UINT32\r
275EFIAPI\r
276GetPhaseStatusCode (\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
286VOID\r
287EFIAPI\r
288SetPhaseStatusCode (\r
289 UINT32 StatusCode\r
290 );\r
291\r
292/**\r
293 This function gets FSP CAR base.\r
294\r
295**/\r
296UINT32\r
297EFIAPI\r
298GetFspCarBase (\r
299 VOID\r
300 );\r
301\r
302/**\r
303 This function gets FSP CAR size.\r
304\r
305**/\r
306UINT32\r
307EFIAPI\r
308GetFspCarSize (\r
309 VOID\r
310 );\r
311\r
6b5677e1
YS
312/**\r
313 This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.\r
314\r
315 @param[in] FspResetType Reset type that needs to returned as API return status\r
316\r
317**/\r
318VOID\r
319EFIAPI\r
320FspApiReturnStatusReset (\r
321 IN UINT32 FspResetType\r
322 );\r
cf1d4549 323#endif\r