summaryrefslogtreecommitdiffstats
path: root/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
diff options
context:
space:
mode:
authorChasel Chiu <chasel.chiu@intel.com>2022-07-25 12:03:51 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-08-31 16:48:07 +0000
commitdf25a5457f04ec465dce97428cfee96f462676e7 (patch)
tree7ebc2087c7473f98f8c7cd8832c2633c1788c6bd /IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
parent4b7bd4c591a81a290b31e9d1a94c4b8be787989e (diff)
downloadedk2-df25a5457f04ec465dce97428cfee96f462676e7.tar.gz
edk2-df25a5457f04ec465dce97428cfee96f462676e7.tar.bz2
edk2-df25a5457f04ec465dce97428cfee96f462676e7.zip
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>
Diffstat (limited to 'IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c')
-rw-r--r--IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
index a6f3892ed8..9c1b5b32e9 100644
--- a/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
+++ b/IntelFsp2Pkg/Library/SecFspSecPlatformLibNull/PlatformSecLibNull.c
@@ -28,6 +28,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.
@@ -42,3 +43,36 @@ FspMultiPhaseSiInitApiHandler (
{
return EFI_SUCCESS;
}
+
+/**
+ 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 UINT8 ApiIdx,
+ IN OUT UINT32 *NumberOfPhasesSupported
+ )
+{
+ /* Example for platform runtime controlling
+ if ((ApiIdx == FspMultiPhaseSiInitApiIndex) && (Feature1Enable == FALSE)) {
+ *NumberOfPhasesSupported = 0;
+ return TRUE;
+ }
+ return FALSE
+ */
+
+ return FALSE;
+}