diff options
author | Chasel Chiu <chasel.chiu@intel.com> | 2022-10-23 20:00:57 -0700 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-11-04 03:04:51 +0000 |
commit | b84f32ae5b475ce657ea1c9db29d4e4ec7711948 (patch) | |
tree | 240a7fde05778b15a896636bcc69c5565417d56a /IntelFsp2Pkg/FspSecCore/SecFspApiChk.c | |
parent | cab1f02565d3b29081dd21afb074f35fdb4e1fd6 (diff) | |
download | edk2-b84f32ae5b475ce657ea1c9db29d4e4ec7711948.tar.gz |
IntelFsp2Pkg: FSP should support input UPD as NULL.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4114
FSP specification supports input UPD as NULL cases which FSP will
use built-in UPD region instead.
FSP should not return INVALID_PARAMETER in such cases.
In FSP-T entry point case, the valid FSP-T UPD region pointer will be
passed to platform FSP code to consume.
In FSP-M and FSP-S cases, valid UPD pointer will be decided when
updating corresponding pointer field in FspGlobalData.
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>
Reviewed-by: Ted Kuo <ted.kuo@intel.com>
Diffstat (limited to 'IntelFsp2Pkg/FspSecCore/SecFspApiChk.c')
-rw-r--r-- | IntelFsp2Pkg/FspSecCore/SecFspApiChk.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c index a44fbf2a50..5f59938518 100644 --- a/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c +++ b/IntelFsp2Pkg/FspSecCore/SecFspApiChk.c @@ -44,6 +44,8 @@ FspApiCallingCheck ( //
if (((UINTN)FspData != MAX_ADDRESS) && ((UINTN)FspData != MAX_UINT32)) {
Status = EFI_UNSUPPORTED;
+ } else if (ApiParam == NULL) {
+ Status = EFI_SUCCESS;
} else if (EFI_ERROR (FspUpdSignatureCheck (ApiIdx, ApiParam))) {
Status = EFI_INVALID_PARAMETER;
}
@@ -67,9 +69,13 @@ FspApiCallingCheck ( } else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
Status = EFI_UNSUPPORTED;
- } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, ApiParam))) {
- Status = EFI_INVALID_PARAMETER;
} else if (ApiIdx == FspSiliconInitApiIndex) {
+ if (ApiParam == NULL) {
+ Status = EFI_SUCCESS;
+ } else if (EFI_ERROR (FspUpdSignatureCheck (FspSiliconInitApiIndex, ApiParam))) {
+ Status = EFI_INVALID_PARAMETER;
+ }
+
//
// Reset MultiPhase NumberOfPhases to zero
//
@@ -89,6 +95,8 @@ FspApiCallingCheck ( } else {
if (FspData->Signature != FSP_GLOBAL_DATA_SIGNATURE) {
Status = EFI_UNSUPPORTED;
+ } else if (ApiParam == NULL) {
+ Status = EFI_SUCCESS;
} else if (EFI_ERROR (FspUpdSignatureCheck (FspSmmInitApiIndex, ApiParam))) {
Status = EFI_INVALID_PARAMETER;
}
|