diff options
Diffstat (limited to 'IntelFspWrapperPkg')
-rw-r--r-- | IntelFspWrapperPkg/FspInitPei/FspInitPei.c | 16 | ||||
-rw-r--r-- | IntelFspWrapperPkg/FspInitPei/FspInitPeiV2.c | 2 |
2 files changed, 12 insertions, 6 deletions
diff --git a/IntelFspWrapperPkg/FspInitPei/FspInitPei.c b/IntelFspWrapperPkg/FspInitPei/FspInitPei.c index 17a646836a..48a030709b 100644 --- a/IntelFspWrapperPkg/FspInitPei/FspInitPei.c +++ b/IntelFspWrapperPkg/FspInitPei/FspInitPei.c @@ -42,17 +42,21 @@ FspPeiEntryPoint ( return EFI_DEVICE_ERROR;
}
+ ASSERT (FspHeader->TempRamInitEntryOffset != 0);
+ ASSERT (FspHeader->FspInitEntryOffset != 0);
+ ASSERT (FspHeader->NotifyPhaseEntryOffset != 0);
+
if ((PcdGet8 (PcdFspApiVersion) >= 2) &&
(FspHeader->HeaderRevision >= FSP_HEADER_REVISION_2) &&
- (FspHeader->ApiEntryNum >= 6) &&
- (FspHeader->FspMemoryInitEntryOffset != 0) &&
- (FspHeader->TempRamExitEntryOffset != 0) &&
- (FspHeader->FspSiliconInitEntryOffset != 0) ) {
- PcdFspApiVersion = FSP_HEADER_REVISION_2;
+ (FspHeader->ApiEntryNum >= 6) ) {
+ ASSERT (FspHeader->FspMemoryInitEntryOffset != 0);
+ ASSERT (FspHeader->TempRamExitEntryOffset != 0);
+ ASSERT (FspHeader->FspSiliconInitEntryOffset != 0);
+ PcdFspApiVersion = PcdGet8 (PcdFspApiVersion);
}
DEBUG ((DEBUG_INFO, "PcdFspApiVersion - 0x%x\n", PcdFspApiVersion));
- if (PcdFspApiVersion == FSP_HEADER_REVISION_1) {
+ if (PcdFspApiVersion == 1) {
PeiFspInitV1 (FspHeader);
} else {
PeiFspInitV2 (FspHeader);
diff --git a/IntelFspWrapperPkg/FspInitPei/FspInitPeiV2.c b/IntelFspWrapperPkg/FspInitPei/FspInitPeiV2.c index 6ddbf7f1b3..7cad84effb 100644 --- a/IntelFspWrapperPkg/FspInitPei/FspInitPeiV2.c +++ b/IntelFspWrapperPkg/FspInitPei/FspInitPeiV2.c @@ -169,6 +169,7 @@ PeiFspMemoryInit ( FspMemoryInitParams.NvsBufferPtr = GetNvsBuffer ();
DEBUG ((DEBUG_INFO, "NvsBufferPtr - 0x%x\n", FspMemoryInitParams.NvsBufferPtr));
FspMemoryInitParams.RtBufferPtr = (VOID *)&FspRtBuffer;
+ FspHobList = NULL;
FspMemoryInitParams.HobListPtr = &FspHobList;
DEBUG ((DEBUG_INFO, "FspMemoryInitParams - 0x%x\n", &FspMemoryInitParams));
@@ -184,6 +185,7 @@ PeiFspMemoryInit ( ASSERT_EFI_ERROR (Status);
DEBUG ((DEBUG_INFO, " HobListPtr (returned) - 0x%x\n", FspHobList));
+ ASSERT (FspHobList != NULL);
FspHobProcessForMemoryResource (FspHobList);
|