/// Action definition for FspMultiPhaseSiInit API\r
///\r
typedef enum {\r
- EnumMultiPhaseGetNumberOfPhases = 0x0,\r
- EnumMultiPhaseExecutePhase = 0x1\r
+ EnumMultiPhaseGetNumberOfPhases = 0x0,\r
+ EnumMultiPhaseExecutePhase = 0x1,\r
+ EnumMultiPhaseGetVariableRequestInfo = 0x2,\r
+ EnumMultiPhaseCompleteVariableRequest = 0x3\r
} FSP_MULTI_PHASE_ACTION;\r
\r
+typedef enum {\r
+ EnumFspVariableRequestGetVariable = 0x0,\r
+ EnumFspVariableRequestGetNextVariableName = 0x1,\r
+ EnumFspVariableRequestSetVariable = 0x2,\r
+ EnumFspVariableRequestQueryVariableInfo = 0x3\r
+} FSP_VARIABLE_REQUEST_TYPE;\r
+\r
+#pragma pack(16)\r
+typedef struct {\r
+ IN FSP_VARIABLE_REQUEST_TYPE VariableRequest;\r
+ IN OUT CHAR16 *VariableName;\r
+ IN OUT UINT64 *VariableNameSize;\r
+ IN OUT EFI_GUID *VariableGuid;\r
+ IN OUT UINT32 *Attributes;\r
+ IN OUT UINT64 *DataSize;\r
+ IN OUT VOID *Data;\r
+ OUT UINT64 *MaximumVariableStorageSize;\r
+ OUT UINT64 *RemainingVariableStorageSize;\r
+ OUT UINT64 *MaximumVariableSize;\r
+} FSP_MULTI_PHASE_VARIABLE_REQUEST_INFO_PARAMS;\r
+\r
+typedef struct {\r
+ EFI_STATUS VariableRequestStatus;\r
+} FSP_MULTI_PHASE_COMPLETE_VARIABLE_REQUEST_PARAMS;\r
+#pragma pack()\r
+\r
///\r
/// Data structure returned by FSP when bootloader calling\r
/// FspMultiPhaseSiInit API with action 0 (EnumMultiPhaseGetNumberOfPhases)\r
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.\r
@retval EFI_DEVICE_ERROR FSP initialization failed.\r
@retval EFI_OUT_OF_RESOURCES Stack range requested by FSP is not met.\r
- @retval FSP_STATUS_RESET_REQUIREDx A reset is reuired. These status codes will not be returned during S3.\r
+ @retval FSP_STATUS_RESET_REQUIREDx A reset is required. These status codes will not be returned during S3.\r
**/\r
typedef\r
EFI_STATUS\r
IN VOID *FspiUpdDataPtr\r
);\r
\r
+/**\r
+ This FSP API provides multi-phase memory and silicon initialization, which brings greater modularity to the existing\r
+ FspMemoryInit() and FspSiliconInit() API. Increased modularity is achieved by adding an extra API to FSP-M and FSP-S.\r
+ This allows the bootloader to add board specific initialization steps throughout the MemoryInit and SiliconInit flows as needed.\r
+ The FspMemoryInit() API is always called before FspMultiPhaseMemInit(); it is the first phase of memory initialization. Similarly,\r
+ the FspSiliconInit() API is always called before FspMultiPhaseSiInit(); it is the first phase of silicon initialization.\r
+ After the first phase, subsequent phases are invoked by calling the FspMultiPhaseMem/SiInit() API.\r
+ The FspMultiPhaseMemInit() API may only be called after the FspMemoryInit() API and before the FspSiliconInit() API;\r
+ or in the case that FSP-T is being used, before the TempRamExit() API. The FspMultiPhaseSiInit() API may only be called after\r
+ the FspSiliconInit() API and before NotifyPhase() API; or in the case that FSP-I is being used, before the FspSmmInit() API.\r
+ The multi-phase APIs may not be called at any other time.\r
+\r
+ @param[in,out] FSP_MULTI_PHASE_PARAMS For action - EnumMultiPhaseGetNumberOfPhases:\r
+ FSP_MULTI_PHASE_PARAMS->MultiPhaseParamPtr will contain\r
+ how many phases supported by FSP.\r
+ For action - EnumMultiPhaseExecutePhase:\r
+ FSP_MULTI_PHASE_PARAMS->MultiPhaseParamPtr shall be NULL.\r
+ @retval EFI_SUCCESS FSP execution environment was initialized successfully.\r
+ @retval EFI_INVALID_PARAMETER Input parameters are invalid.\r
+ @retval EFI_UNSUPPORTED The FSP calling conditions were not met.\r
+ @retval EFI_DEVICE_ERROR FSP initialization failed.\r
+ @retval FSP_STATUS_RESET_REQUIRED_* A reset is required. These status codes will not be returned during S3.\r
+ @retval FSP_STATUS_VARIABLE_REQUEST A variable request has been made by FSP that needs boot loader handling.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI *FSP_MULTI_PHASE_INIT)(\r
+ IN FSP_MULTI_PHASE_PARAMS *MultiPhaseInitParamPtr\r
+ );\r
+\r
#endif\r