]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFspPkg/Include/Library/FspCommonLib.h
Update IntelFspPkg to support FSP1.1
[mirror_edk2.git] / IntelFspPkg / Include / Library / FspCommonLib.h
CommitLineData
c8ec22a2
JY
1/** @file\r
2\r
d5fb1edf 3 Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
c8ec22a2
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
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 paramter passed by the bootlaoder.\r
44\r
45 @retval ApiParameter FSP API paramter 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 sets the FSP API paramter in the stack.\r
55\r
56 @param[in] Value New parameter value.\r
57\r
58**/\r
59VOID\r
60EFIAPI\r
61SetFspApiParameter (\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
71VOID\r
72EFIAPI\r
73SetFspContinuationFuncParameter (\r
74 IN UINT32 Value,\r
75 IN UINT32 Index\r
76 );\r
77\r
78/**\r
9da59186 79 This function changes the BootLoader return address in stack.\r
c8ec22a2
JY
80\r
81 @param[in] ReturnAddress Address to return.\r
82\r
83**/\r
84VOID\r
85EFIAPI\r
86SetFspApiReturnAddress (\r
87 IN UINT32 ReturnAddress\r
88 );\r
89\r
90/**\r
9da59186 91 This function set the API status code returned to the BootLoader.\r
c8ec22a2
JY
92\r
93 @param[in] ReturnStatus Status code to return.\r
94\r
95**/\r
96VOID\r
97EFIAPI\r
98SetFspApiReturnStatus (\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
108VOID\r
109EFIAPI\r
110SetFspCoreStackPointer (\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
120VOID\r
121EFIAPI\r
122SetFspPlatformDataPointer (\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
132VOID *\r
133EFIAPI\r
134GetFspPlatformDataPointer (\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
143VOID\r
144EFIAPI\r
145SetFspUpdDataPointer (\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
154VOID *\r
155EFIAPI\r
156GetFspUpdDataPointer (\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
167UINT64\r
168EFIAPI\r
169SetFspMeasurePoint (\r
170 IN UINT8 Id\r
171 );\r
172\r
d5fb1edf
JY
173/**\r
174 This function gets the FSP info header pointer.\r
175\r
176 @retval FspInfoHeader FSP info header pointer\r
177**/\r
178FSP_INFO_HEADER *\r
179EFIAPI\r
180GetFspInfoHeader (\r
181 VOID\r
182 );\r
183\r
9da59186
JY
184/**\r
185 This function gets the VPD data pointer.\r
186\r
187 @return VpdDataRgnPtr VPD data pointer.\r
188**/\r
189VOID *\r
190EFIAPI\r
191GetFspVpdDataPointer (\r
192 VOID\r
193 );\r
194\r
d5fb1edf 195/**\r
6ca9135a 196 This function gets FSP API calling mode.\r
d5fb1edf
JY
197\r
198 @retval API calling mode\r
199**/\r
200UINT8\r
201EFIAPI\r
202GetFspApiCallingMode (\r
203 VOID\r
204 );\r
205\r
206/**\r
6ca9135a 207 This function sets FSP API calling mode.\r
d5fb1edf
JY
208\r
209 @param[in] Mode API calling mode\r
210**/\r
211VOID\r
212EFIAPI\r
213SetFspApiCallingMode (\r
214 UINT8 Mode\r
215 );\r
216\r
c8ec22a2 217#endif\r