VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/IntelFsp2Pkg/Include/Library/FspCommonLib.h@ 80728

Last change on this file since 80728 was 80721, checked in by vboxsync, 5 years ago

Devices/EFI/FirmwareNew: Start upgrade process to edk2-stable201908 (compiles on Windows and works to some extent), bugref:4643

  • Property svn:eol-style set to native
File size: 4.8 KB
Line 
1/** @file
2
3 Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5
6**/
7
8#ifndef _FSP_COMMON_LIB_H_
9#define _FSP_COMMON_LIB_H_
10
11#include <FspGlobalData.h>
12#include <FspMeasurePointId.h>
13
14/**
15 This function sets the FSP global data pointer.
16
17 @param[in] FspData Fsp global data pointer.
18
19**/
20VOID
21EFIAPI
22SetFspGlobalDataPointer (
23 IN FSP_GLOBAL_DATA *FspData
24 );
25
26/**
27 This function gets the FSP global data pointer.
28
29**/
30FSP_GLOBAL_DATA *
31EFIAPI
32GetFspGlobalDataPointer (
33 VOID
34 );
35
36/**
37 This function gets back the FSP API first parameter passed by the bootloader.
38
39 @retval ApiParameter FSP API first parameter passed by the bootloader.
40**/
41UINT32
42EFIAPI
43GetFspApiParameter (
44 VOID
45 );
46
47/**
48 This function gets back the FSP API second parameter passed by the bootloader.
49
50 @retval ApiParameter FSP API second parameter passed by the bootloader.
51**/
52UINT32
53EFIAPI
54GetFspApiParameter2 (
55 VOID
56 );
57
58/**
59 This function returns the FSP entry stack pointer from address of the first API parameter.
60
61 @retval FSP entry stack pointer.
62**/
63VOID*
64EFIAPI
65GetFspEntryStack (
66 VOID
67 );
68
69/**
70 This function sets the FSP API parameter in the stack.
71
72 @param[in] Value New parameter value.
73
74**/
75VOID
76EFIAPI
77SetFspApiParameter (
78 IN UINT32 Value
79 );
80
81/**
82 This function set the API status code returned to the BootLoader.
83
84 @param[in] ReturnStatus Status code to return.
85
86**/
87VOID
88EFIAPI
89SetFspApiReturnStatus (
90 IN UINT32 ReturnStatus
91 );
92
93/**
94 This function sets the context switching stack to a new stack frame.
95
96 @param[in] NewStackTop New core stack to be set.
97
98**/
99VOID
100EFIAPI
101SetFspCoreStackPointer (
102 IN VOID *NewStackTop
103 );
104
105/**
106 This function sets the platform specific data pointer.
107
108 @param[in] PlatformData Fsp platform specific data pointer.
109
110**/
111VOID
112EFIAPI
113SetFspPlatformDataPointer (
114 IN VOID *PlatformData
115 );
116
117/**
118 This function gets the platform specific data pointer.
119
120 @param[in] PlatformData Fsp platform specific data pointer.
121
122**/
123VOID *
124EFIAPI
125GetFspPlatformDataPointer (
126 VOID
127 );
128
129/**
130 This function sets the UPD data pointer.
131
132 @param[in] UpdDataPtr UPD data pointer.
133**/
134VOID
135EFIAPI
136SetFspUpdDataPointer (
137 IN VOID *UpdDataPtr
138 );
139
140/**
141 This function gets the UPD data pointer.
142
143 @return UpdDataPtr UPD data pointer.
144**/
145VOID *
146EFIAPI
147GetFspUpdDataPointer (
148 VOID
149 );
150
151/**
152 This function sets the memory init UPD data pointer.
153
154 @param[in] MemoryInitUpdPtr memory init UPD data pointer.
155**/
156VOID
157EFIAPI
158SetFspMemoryInitUpdDataPointer (
159 IN VOID *MemoryInitUpdPtr
160 );
161
162/**
163 This function gets the memory init UPD data pointer.
164
165 @return memory init UPD data pointer.
166**/
167VOID *
168EFIAPI
169GetFspMemoryInitUpdDataPointer (
170 VOID
171 );
172
173/**
174 This function sets the silicon init UPD data pointer.
175
176 @param[in] SiliconInitUpdPtr silicon init UPD data pointer.
177**/
178VOID
179EFIAPI
180SetFspSiliconInitUpdDataPointer (
181 IN VOID *SiliconInitUpdPtr
182 );
183
184/**
185 This function gets the silicon init UPD data pointer.
186
187 @return silicon init UPD data pointer.
188**/
189VOID *
190EFIAPI
191GetFspSiliconInitUpdDataPointer (
192 VOID
193 );
194
195/**
196 Set FSP measurement point timestamp.
197
198 @param[in] Id Measurement point ID.
199
200 @return performance timestamp.
201**/
202UINT64
203EFIAPI
204SetFspMeasurePoint (
205 IN UINT8 Id
206 );
207
208/**
209 This function gets the FSP info header pointer.
210
211 @retval FspInfoHeader FSP info header pointer
212**/
213FSP_INFO_HEADER *
214EFIAPI
215GetFspInfoHeader (
216 VOID
217 );
218
219/**
220 This function sets the FSP info header pointer.
221
222 @param[in] FspInfoHeader FSP info header pointer
223**/
224VOID
225EFIAPI
226SetFspInfoHeader (
227 FSP_INFO_HEADER *FspInfoHeader
228 );
229
230/**
231 This function gets the FSP info header pointer from the API context.
232
233 @retval FspInfoHeader FSP info header pointer
234**/
235FSP_INFO_HEADER *
236EFIAPI
237GetFspInfoHeaderFromApiContext (
238 VOID
239 );
240
241/**
242 This function gets the CfgRegion data pointer.
243
244 @return CfgRegion data pointer.
245**/
246VOID *
247EFIAPI
248GetFspCfgRegionDataPointer (
249 VOID
250 );
251
252/**
253 This function gets FSP API calling mode.
254
255 @retval API calling mode
256**/
257UINT8
258EFIAPI
259GetFspApiCallingIndex (
260 VOID
261 );
262
263/**
264 This function sets FSP API calling mode.
265
266 @param[in] Index API calling index
267**/
268VOID
269EFIAPI
270SetFspApiCallingIndex (
271 UINT8 Index
272 );
273
274/**
275 This function gets FSP Phase StatusCode.
276
277 @retval StatusCode
278**/
279UINT32
280EFIAPI
281GetPhaseStatusCode (
282 VOID
283 );
284
285
286/**
287 This function sets FSP Phase StatusCode.
288
289 @param[in] Mode Phase StatusCode
290**/
291VOID
292EFIAPI
293SetPhaseStatusCode (
294 UINT32 StatusCode
295 );
296
297/**
298 This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.
299
300 @param[in] FspResetType Reset type that needs to returned as API return status
301
302**/
303VOID
304EFIAPI
305FspApiReturnStatusReset (
306 IN UINT32 FspResetType
307 );
308#endif
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette