3 Copyright (c) 2014 - 2019, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
8 #ifndef _FSP_COMMON_LIB_H_
9 #define _FSP_COMMON_LIB_H_
11 #include <FspGlobalData.h>
12 #include <FspMeasurePointId.h>
15 This function sets the FSP global data pointer.
17 @param[in] FspData Fsp global data pointer.
22 SetFspGlobalDataPointer (
23 IN FSP_GLOBAL_DATA
*FspData
27 This function gets the FSP global data pointer.
32 GetFspGlobalDataPointer (
37 This function gets back the FSP API first parameter passed by the bootloader.
39 @retval ApiParameter FSP API first parameter passed by the bootloader.
48 This function gets back the FSP API second parameter passed by the bootloader.
50 @retval ApiParameter FSP API second parameter passed by the bootloader.
59 This function returns the FSP entry stack pointer from address of the first API parameter.
61 @retval FSP entry stack pointer.
70 This function sets the FSP API parameter in the stack.
72 @param[in] Value New parameter value.
82 This function set the API status code returned to the BootLoader.
84 @param[in] ReturnStatus Status code to return.
89 SetFspApiReturnStatus (
94 This function sets the context switching stack to a new stack frame.
96 @param[in] NewStackTop New core stack to be set.
101 SetFspCoreStackPointer (
106 This function sets the platform specific data pointer.
108 @param[in] PlatformData Fsp platform specific data pointer.
113 SetFspPlatformDataPointer (
114 IN VOID
*PlatformData
118 This function gets the platform specific data pointer.
120 @param[in] PlatformData Fsp platform specific data pointer.
125 GetFspPlatformDataPointer (
130 This function sets the UPD data pointer.
132 @param[in] UpdDataPtr UPD data pointer.
136 SetFspUpdDataPointer (
141 This function gets the UPD data pointer.
143 @return UpdDataPtr UPD data pointer.
147 GetFspUpdDataPointer (
152 This function sets the memory init UPD data pointer.
154 @param[in] MemoryInitUpdPtr memory init UPD data pointer.
158 SetFspMemoryInitUpdDataPointer (
159 IN VOID
*MemoryInitUpdPtr
163 This function gets the memory init UPD data pointer.
165 @return memory init UPD data pointer.
169 GetFspMemoryInitUpdDataPointer (
174 This function sets the silicon init UPD data pointer.
176 @param[in] SiliconInitUpdPtr silicon init UPD data pointer.
180 SetFspSiliconInitUpdDataPointer (
181 IN VOID
*SiliconInitUpdPtr
185 This function gets the silicon init UPD data pointer.
187 @return silicon init UPD data pointer.
191 GetFspSiliconInitUpdDataPointer (
196 Set FSP measurement point timestamp.
198 @param[in] Id Measurement point ID.
200 @return performance timestamp.
209 This function gets the FSP info header pointer.
211 @retval FspInfoHeader FSP info header pointer
220 This function sets the FSP info header pointer.
222 @param[in] FspInfoHeader FSP info header pointer
227 FSP_INFO_HEADER
*FspInfoHeader
231 This function gets the FSP info header pointer from the API context.
233 @retval FspInfoHeader FSP info header pointer
237 GetFspInfoHeaderFromApiContext (
242 This function gets the CfgRegion data pointer.
244 @return CfgRegion data pointer.
248 GetFspCfgRegionDataPointer (
253 This function gets FSP API calling mode.
255 @retval API calling mode
259 GetFspApiCallingIndex (
264 This function sets FSP API calling mode.
266 @param[in] Index API calling index
270 SetFspApiCallingIndex (
275 This function gets FSP Phase StatusCode.
286 This function sets FSP Phase StatusCode.
288 @param[in] Mode Phase StatusCode
297 This function updates the return status of the FSP API with requested reset type and returns to Boot Loader.
299 @param[in] FspResetType Reset type that needs to returned as API return status
304 FspApiReturnStatusReset (
305 IN EFI_STATUS FspResetType