2 Intel FSP API definition from Intel Firmware Support Package External
3 Architecture Specification v2.0.
5 Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
21 /// FSP_UPD_HEADER Configuration.
25 /// UPD Region Signature. This signature will be
26 /// "XXXXXX_T" for FSP-T
27 /// "XXXXXX_M" for FSP-M
28 /// "XXXXXX_S" for FSP-S
29 /// Where XXXXXX is an unique signature
33 /// Revision of the Data structure. For FSP v2.0 value is 1.
40 /// FSPM_ARCH_UPD Configuration.
44 /// Revision of the structure. For FSP v2.0 value is 1.
49 /// Pointer to the non-volatile storage (NVS) data buffer.
50 /// If it is NULL it indicates the NVS data is not available.
54 /// Pointer to the temporary stack base address to be
55 /// consumed inside FspMemoryInit() API.
59 /// Temporary stack size to be consumed inside
60 /// FspMemoryInit() API.
64 /// Size of memory to be reserved by FSP below "top
65 /// of low usable memory" for bootloader usage.
67 UINT32 BootLoaderTolumSize
;
69 /// Current boot mode.
76 /// FSPT_UPD_COMMON Configuration.
80 /// FSP_UPD_HEADER Configuration.
82 FSP_UPD_HEADER FspUpdHeader
;
86 /// FSPM_UPD_COMMON Configuration.
90 /// FSP_UPD_HEADER Configuration.
92 FSP_UPD_HEADER FspUpdHeader
;
94 /// FSPM_ARCH_UPD Configuration.
96 FSPM_ARCH_UPD FspmArchUpd
;
100 /// FSPS_UPD_COMMON Configuration.
104 /// FSP_UPD_HEADER Configuration.
106 FSP_UPD_HEADER FspUpdHeader
;
110 /// Enumeration of FSP_INIT_PHASE for NOTIFY_PHASE.
114 /// This stage is notified when the bootloader completes the
115 /// PCI enumeration and the resource allocation for the
116 /// PCI devices is complete.
118 EnumInitPhaseAfterPciEnumeration
= 0x20,
120 /// This stage is notified just before the bootloader hand-off
121 /// to the OS loader.
123 EnumInitPhaseReadyToBoot
= 0x40,
125 /// This stage is notified just before the firmware/Preboot
126 /// environment transfers management of all system resources
127 /// to the OS or next level execution environment.
129 EnumInitPhaseEndOfFirmware
= 0xF0
133 /// Definition of NOTIFY_PHASE_PARAMS.
137 /// Notification phase used for NotifyPhase API
139 FSP_INIT_PHASE Phase
;
140 } NOTIFY_PHASE_PARAMS
;
145 This FSP API is called soon after coming out of reset and before memory and stack is
146 available. This FSP API will load the microcode update, enable code caching for the
147 region specified by the boot loader and also setup a temporary stack to be used until
148 main memory is initialized.
150 A hardcoded stack can be set up with the following values, and the "esp" register
151 initialized to point to this hardcoded stack.
152 1. The return address where the FSP will return control after setting up a temporary
154 2. A pointer to the input parameter structure
156 However, since the stack is in ROM and not writeable, this FSP API cannot be called
157 using the "call" instruction, but needs to be jumped to.
159 @param[in] FsptUpdDataPtr Pointer to the FSPT_UPD data structure.
161 @retval EFI_SUCCESS Temporary RAM was initialized successfully.
162 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
163 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
164 @retval EFI_DEVICE_ERROR Temp RAM initialization failed.
166 If this function is successful, the FSP initializes the ECX and EDX registers to point to
167 a temporary but writeable memory range available to the boot loader and returns with
168 FSP_SUCCESS in register EAX. Register ECX points to the start of this temporary
169 memory range and EDX points to the end of the range. Boot loader is free to use the
170 whole range described. Typically the boot loader can reload the ESP register to point
171 to the end of this returned range so that it can be used as a standard stack.
175 (EFIAPI
*FSP_TEMP_RAM_INIT
) (
176 IN VOID
*FsptUpdDataPtr
180 This FSP API is used to notify the FSP about the different phases in the boot process.
181 This allows the FSP to take appropriate actions as needed during different initialization
182 phases. The phases will be platform dependent and will be documented with the FSP
183 release. The current FSP supports two notify phases:
187 @param[in] NotifyPhaseParamPtr Address pointer to the NOTIFY_PHASE_PRAMS
189 @retval EFI_SUCCESS The notification was handled successfully.
190 @retval EFI_UNSUPPORTED The notification was not called in the proper order.
191 @retval EFI_INVALID_PARAMETER The notification code is invalid.
195 (EFIAPI
*FSP_NOTIFY_PHASE
) (
196 IN NOTIFY_PHASE_PARAMS
*NotifyPhaseParamPtr
200 This FSP API is called after TempRamInit and initializes the memory.
201 This FSP API accepts a pointer to a data structure that will be platform dependent
202 and defined for each FSP binary. This will be documented in Integration guide with
204 After FspMemInit completes its execution, it passes the pointer to the HobList and
205 returns to the boot loader from where it was called. BootLoader is responsible to
206 migrate it's stack and data to Memory.
207 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
208 complete the silicon initialization and provides bootloader an opportunity to get
209 control after system memory is available and before the temporary RAM is torn down.
211 @param[in] FspmUpdDataPtr Pointer to the FSPM_UPD data sructure.
212 @param[out] HobListPtr Pointer to receive the address of the HOB list.
214 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
215 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
216 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
217 @retval EFI_DEVICE_ERROR FSP initialization failed.
218 @retval EFI_OUT_OF_RESOURCES Stack range requested by FSP is not met.
219 @retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
223 (EFIAPI
*FSP_MEMORY_INIT
) (
224 IN VOID
*FspmUpdDataPtr
,
225 OUT VOID
**HobListPtr
230 This FSP API is called after FspMemoryInit API. This FSP API tears down the temporary
231 memory setup by TempRamInit API. This FSP API accepts a pointer to a data structure
232 that will be platform dependent and defined for each FSP binary. This will be
233 documented in Integration Guide.
234 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
235 complete the silicon initialization and provides bootloader an opportunity to get
236 control after system memory is available and before the temporary RAM is torn down.
238 @param[in] TempRamExitParamPtr Pointer to the Temp Ram Exit parameters structure.
239 This structure is normally defined in the Integration Guide.
240 And if it is not defined in the Integration Guide, pass NULL.
242 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
243 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
244 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
245 @retval EFI_DEVICE_ERROR FSP initialization failed.
249 (EFIAPI
*FSP_TEMP_RAM_EXIT
) (
250 IN VOID
*TempRamExitParamPtr
255 This FSP API is called after TempRamExit API.
256 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the
257 silicon initialization.
259 @param[in] FspsUpdDataPtr Pointer to the FSPS_UPD data structure.
260 If NULL, FSP will use the default parameters.
262 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
263 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
264 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
265 @retval EFI_DEVICE_ERROR FSP initialization failed.
266 @retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
270 (EFIAPI
*FSP_SILICON_INIT
) (
271 IN VOID
*FspsUpdDataPtr