]>
git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2Pkg/Include/Library/FspCommonLib.h
3 Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php.
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 #ifndef _FSP_COMMON_LIB_H_
15 #define _FSP_COMMON_LIB_H_
17 #include <FspGlobalData.h>
18 #include <FspMeasurePointId.h>
21 This function sets the FSP global data pointer.
23 @param[in] FspData Fsp global data pointer.
28 SetFspGlobalDataPointer (
29 IN FSP_GLOBAL_DATA
*FspData
33 This function gets the FSP global data pointer.
38 GetFspGlobalDataPointer (
43 This function gets back the FSP API first parameter passed by the bootloader.
45 @retval ApiParameter FSP API first parameter passed by the bootloader.
54 This function gets back the FSP API second parameter passed by the bootloader.
56 @retval ApiParameter FSP API second parameter passed by the bootloader.
65 This function returns the FSP entry stack pointer from address of the first API parameter.
67 @retval FSP entry stack pointer.
76 This function sets the FSP API parameter in the stack.
78 @param[in] Value New parameter value.
88 This function set the API status code returned to the BootLoader.
90 @param[in] ReturnStatus Status code to return.
95 SetFspApiReturnStatus (
96 IN UINT32 ReturnStatus
100 This function sets the context switching stack to a new stack frame.
102 @param[in] NewStackTop New core stack to be set.
107 SetFspCoreStackPointer (
112 This function sets the platform specific data pointer.
114 @param[in] PlatformData Fsp platform specific data pointer.
119 SetFspPlatformDataPointer (
120 IN VOID
*PlatformData
124 This function gets the platform specific data pointer.
126 @param[in] PlatformData Fsp platform specific data pointer.
131 GetFspPlatformDataPointer (
136 This function sets the UPD data pointer.
138 @param[in] UpdDataPtr UPD data pointer.
142 SetFspUpdDataPointer (
147 This function gets the UPD data pointer.
149 @return UpdDataPtr UPD data pointer.
153 GetFspUpdDataPointer (
158 This function sets the memory init UPD data pointer.
160 @param[in] MemoryInitUpdPtr memory init UPD data pointer.
164 SetFspMemoryInitUpdDataPointer (
165 IN VOID
*MemoryInitUpdPtr
169 This function gets the memory init UPD data pointer.
171 @return memory init UPD data pointer.
175 GetFspMemoryInitUpdDataPointer (
180 This function sets the silicon init UPD data pointer.
182 @param[in] SiliconInitUpdPtr silicon init UPD data pointer.
186 SetFspSiliconInitUpdDataPointer (
187 IN VOID
*SiliconInitUpdPtr
191 This function gets the silicon init UPD data pointer.
193 @return silicon init UPD data pointer.
197 GetFspSiliconInitUpdDataPointer (
202 Set FSP measurement point timestamp.
204 @param[in] Id Measurement point ID.
206 @return performance timestamp.
215 This function gets the FSP info header pointer.
217 @retval FspInfoHeader FSP info header pointer
226 This function sets the FSP info header pointer.
228 @param[in] FspInfoHeader FSP info header pointer
233 FSP_INFO_HEADER
*FspInfoHeader
237 This function gets the FSP info header pointer from the API context.
239 @retval FspInfoHeader FSP info header pointer
243 GetFspInfoHeaderFromApiContext (
248 This function gets the CfgRegion data pointer.
250 @return CfgRegion data pointer.
254 GetFspCfgRegionDataPointer (
259 This function gets FSP API calling mode.
261 @retval API calling mode
265 GetFspApiCallingIndex (
270 This function sets FSP API calling mode.
272 @param[in] Index API calling index
276 SetFspApiCallingIndex (
281 This function gets FSP Phase StatusCode.
293 This function sets FSP Phase StatusCode.
295 @param[in] Mode Phase StatusCode
304 This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.
306 @param[in] FspResetType Reset type that needs to returned as API return status
311 FspApiReturnStatusReset (
312 IN UINT32 FspResetType