IntelFsp2Pkg: Add FSP 2.4 MultiPhase interface.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3916

Provide FSP 2.4 MultiPhase interface and scripts
support.

Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
This commit is contained in:
Chasel Chiu
2022-07-25 12:03:51 -07:00
committed by mergify[bot]
parent 4b7bd4c591
commit df25a5457f
10 changed files with 450 additions and 29 deletions

View File

@@ -0,0 +1,55 @@
/** @file
FSP MultiPhase Library.
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#ifndef _FSP_MULTIPHASE_LIB_H_
#define _FSP_MULTIPHASE_LIB_H_
EFI_STATUS
EFIAPI
FspMultiPhaseSwitchStack (
);
EFI_STATUS
EFIAPI
FspVariableRequestSwitchStack (
IN FSP_MULTI_PHASE_VARIABLE_REQUEST_INFO_PARAMS *FspVariableRequestParams
);
/**
This function handles FspMultiPhaseMemInitApi.
@param[in] ApiIdx Internal index of the FSP API.
@param[in] ApiParam Parameter of the FSP API.
@retval EFI_SUCCESS FSP execution was successful.
@retval EFI_INVALID_PARAMETER Input parameters are invalid.
@retval EFI_UNSUPPORTED The FSP calling conditions were not met.
@retval EFI_DEVICE_ERROR FSP initialization failed.
**/
EFI_STATUS
EFIAPI
FspMultiPhaseMemInitApiHandler (
IN UINT32 ApiIdx,
IN VOID *ApiParam
);
/**
This function handles FspMultiPhaseSiInitApi.
@param[in] ApiIdx Internal index of the FSP API.
@param[in] ApiParam Parameter of the FSP API.
**/
EFI_STATUS
EFIAPI
FspMultiPhaseSiInitApiHandlerV2 (
IN UINT32 ApiIdx,
IN VOID *ApiParam
);
#endif

View File

@@ -81,6 +81,7 @@ FspUpdSignatureCheck (
/**
This function handles FspMultiPhaseSiInitApi.
Starting from FSP 2.4 this function is obsolete and FspMultiPhaseSiInitApiHandlerV2 is the replacement.
@param[in] ApiIdx Internal index of the FSP API.
@param[in] ApiParam Parameter of the FSP API.
@@ -93,4 +94,26 @@ FspMultiPhaseSiInitApiHandler (
IN VOID *ApiParam
);
/**
FSP MultiPhase Platform Get Number Of Phases Function.
Allows an FSP binary to dynamically update the number of phases at runtime.
For example, UPD settings could negate the need to enter the multi-phase flow
in certain scenarios. If this function returns FALSE, the default number of phases
provided by PcdMultiPhaseNumberOfPhases will be returned to the bootloader instead.
@param[in] ApiIdx - Internal index of the FSP API.
@param[in] NumberOfPhasesSupported - How many phases are supported by current FSP Component.
@retval TRUE - NumberOfPhases are modified by Platform during runtime.
@retval FALSE - The Default build time NumberOfPhases should be used.
**/
BOOLEAN
EFIAPI
FspMultiPhasePlatformGetNumberOfPhases (
IN UINTN ApiIdx,
IN OUT UINT32 *NumberOfPhasesSupported
);
#endif