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.
22 /// UPD Region Signature. This signature will be
23 /// "XXXXXX_T" for FSP-T
24 /// "XXXXXX_M" for FSP-M
25 /// "XXXXXX_S" for FSP-S
26 /// Where XXXXXX is an unique signature
30 /// Revision of the Data structure. For FSP v2.0 value is 1.
38 /// Revision of the structure. For FSP v2.0 value is 1.
43 /// Pointer to the non-volatile storage (NVS) data buffer.
44 /// If it is NULL it indicates the NVS data is not available.
48 /// Pointer to the temporary stack base address to be
49 /// consumed inside FspMemoryInit() API.
53 /// Temporary stack size to be consumed inside
54 /// FspMemoryInit() API.
58 /// Size of memory to be reserved by FSP below "top
59 /// of low usable memory" for bootloader usage.
61 UINT32 BootLoaderTolumSize
;
63 /// Current boot mode.
70 FSP_UPD_HEADER FspUpdHeader
;
74 FSP_UPD_HEADER FspUpdHeader
;
75 FSPM_ARCH_UPD FspmArchUpd
;
79 FSP_UPD_HEADER FspUpdHeader
;
84 /// This stage is notified when the bootloader completes the
85 /// PCI enumeration and the resource allocation for the
86 /// PCI devices is complete.
88 EnumInitPhaseAfterPciEnumeration
= 0x20,
90 /// This stage is notified just before the bootloader hand-off
93 EnumInitPhaseReadyToBoot
= 0x40,
95 /// This stage is notified just before the firmware/Preboot
96 /// environment transfers management of all system resources
97 /// to the OS or next level execution environment.
99 EnumInitPhaseEndOfFirmware
= 0xF0
104 /// Notification phase used for NotifyPhase API
106 FSP_INIT_PHASE Phase
;
107 } NOTIFY_PHASE_PARAMS
;
112 This FSP API is called soon after coming out of reset and before memory and stack is
113 available. This FSP API will load the microcode update, enable code caching for the
114 region specified by the boot loader and also setup a temporary stack to be used until
115 main memory is initialized.
117 A hardcoded stack can be set up with the following values, and the "esp" register
118 initialized to point to this hardcoded stack.
119 1. The return address where the FSP will return control after setting up a temporary
121 2. A pointer to the input parameter structure
123 However, since the stack is in ROM and not writeable, this FSP API cannot be called
124 using the "call" instruction, but needs to be jumped to.
126 @param[in] FsptUpdDataPtr Pointer to the FSPT_UPD data structure.
128 @retval EFI_SUCCESS Temporary RAM was initialized successfully.
129 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
130 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
131 @retval EFI_DEVICE_ERROR Temp RAM initialization failed.
133 If this function is successful, the FSP initializes the ECX and EDX registers to point to
134 a temporary but writeable memory range available to the boot loader and returns with
135 FSP_SUCCESS in register EAX. Register ECX points to the start of this temporary
136 memory range and EDX points to the end of the range. Boot loader is free to use the
137 whole range described. Typically the boot loader can reload the ESP register to point
138 to the end of this returned range so that it can be used as a standard stack.
142 (EFIAPI
*FSP_TEMP_RAM_INIT
) (
143 IN VOID
*FsptUpdDataPtr
147 This FSP API is used to notify the FSP about the different phases in the boot process.
148 This allows the FSP to take appropriate actions as needed during different initialization
149 phases. The phases will be platform dependent and will be documented with the FSP
150 release. The current FSP supports two notify phases:
154 @param[in] NotifyPhaseParamPtr Address pointer to the NOTIFY_PHASE_PRAMS
156 @retval EFI_SUCCESS The notification was handled successfully.
157 @retval EFI_UNSUPPORTED The notification was not called in the proper order.
158 @retval EFI_INVALID_PARAMETER The notification code is invalid.
162 (EFIAPI
*FSP_NOTIFY_PHASE
) (
163 IN NOTIFY_PHASE_PARAMS
*NotifyPhaseParamPtr
167 This FSP API is called after TempRamInit and initializes the memory.
168 This FSP API accepts a pointer to a data structure that will be platform dependent
169 and defined for each FSP binary. This will be documented in Integration guide with
171 After FspMemInit completes its execution, it passes the pointer to the HobList and
172 returns to the boot loader from where it was called. BootLoader is responsible to
173 migrate it's stack and data to Memory.
174 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
175 complete the silicon initialization and provides bootloader an opportunity to get
176 control after system memory is available and before the temporary RAM is torn down.
178 @param[in] FspmUpdDataPtr Pointer to the FSPM_UPD data sructure.
179 @param[out] HobListPtr Pointer to receive the address of the HOB list.
181 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
182 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
183 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
184 @retval EFI_DEVICE_ERROR FSP initialization failed.
185 @retval EFI_OUT_OF_RESOURCES Stack range requested by FSP is not met.
186 @retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
190 (EFIAPI
*FSP_MEMORY_INIT
) (
191 IN VOID
*FspmUpdDataPtr
,
192 OUT VOID
**HobListPtr
197 This FSP API is called after FspMemoryInit API. This FSP API tears down the temporary
198 memory setup by TempRamInit API. This FSP API accepts a pointer to a data structure
199 that will be platform dependent and defined for each FSP binary. This will be
200 documented in Integration Guide.
201 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to
202 complete the silicon initialization and provides bootloader an opportunity to get
203 control after system memory is available and before the temporary RAM is torn down.
205 @param[in] TempRamExitParamPtr Pointer to the Temp Ram Exit parameters structure.
206 This structure is normally defined in the Integration Guide.
207 And if it is not defined in the Integration Guide, pass NULL.
209 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
210 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
211 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
212 @retval EFI_DEVICE_ERROR FSP initialization failed.
216 (EFIAPI
*FSP_TEMP_RAM_EXIT
) (
217 IN VOID
*TempRamExitParamPtr
222 This FSP API is called after TempRamExit API.
223 FspMemoryInit, TempRamExit and FspSiliconInit APIs provide an alternate method to complete the
224 silicon initialization.
226 @param[in] FspsUpdDataPtr Pointer to the FSPS_UPD data structure.
227 If NULL, FSP will use the default parameters.
229 @retval EFI_SUCCESS FSP execution environment was initialized successfully.
230 @retval EFI_INVALID_PARAMETER Input parameters are invalid.
231 @retval EFI_UNSUPPORTED The FSP calling conditions were not met.
232 @retval EFI_DEVICE_ERROR FSP initialization failed.
233 @retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.
237 (EFIAPI
*FSP_SILICON_INIT
) (
238 IN VOID
*FspsUpdDataPtr