From: Yao, Jiewen Date: Tue, 27 Oct 2015 23:10:49 +0000 (+0000) Subject: Publish FspHob to PEI Hob by default. X-Git-Tag: edk2-stable201903~8677 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=5b5e5674ae59721d4e045401c2deaaa76a96cda6;hp=9838b0161d3d1dfc9903f24ea5dc993dd0792325 Publish FspHob to PEI Hob by default. because most platforms use such logic. PcdDataBaseHobGuid GuidHob is excluded because PCD database in FSP is different with the one in PEI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: "Yao, Jiewen" Reviewed-by: "Ma, Maurice" Reviewed-by: "Rangarajan, Ravi P" git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18687 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c index 099980e525..a96c151df4 100644 --- a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c +++ b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/FspHobProcessLibSample.c @@ -25,6 +25,7 @@ #include #include +#include #include // @@ -334,6 +335,41 @@ FspHobProcessForMemoryResource ( return EFI_SUCCESS; } +/** + Process FSP HOB list + + @param[in] FspHobList Pointer to the HOB data structure produced by FSP. + +**/ +VOID +ProcessFspHobList ( + IN VOID *FspHobList + ) +{ + EFI_PEI_HOB_POINTERS FspHob; + + FspHob.Raw = FspHobList; + + // + // Add all the HOBs from FSP binary to FSP wrapper + // + while (!END_OF_HOB_LIST (FspHob)) { + if (FspHob.Header->HobType == EFI_HOB_TYPE_GUID_EXTENSION) { + // + // Skip FSP binary creates PcdDataBaseHobGuid + // + if (!CompareGuid(&FspHob.Guid->Name, &gPcdDataBaseHobGuid)) { + BuildGuidDataHob ( + &FspHob.Guid->Name, + GET_GUID_HOB_DATA(FspHob), + GET_GUID_HOB_DATA_SIZE(FspHob) + ); + } + } + FspHob.Raw = GET_NEXT_HOB (FspHob); + } +} + /** BIOS process FspBobList for other data (not Memory Resource Descriptor). @@ -347,6 +383,8 @@ FspHobProcessForOtherData ( IN VOID *FspHobList ) { + ProcessFspHobList (FspHobList); + return EFI_SUCCESS; } diff --git a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf index 12f922c0d9..c7f35f7bdf 100644 --- a/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf +++ b/IntelFspWrapperPkg/Library/PeiFspHobProcessLibSample/PeiFspHobProcessLibSample.inf @@ -70,6 +70,7 @@ [Guids] gFspReservedMemoryResourceHobGuid ## CONSUMES ## HOB gEfiMemoryTypeInformationGuid ## CONSUMES ## GUID + gPcdDataBaseHobGuid ## CONSUMES ## HOB [Ppis] gEfiPeiCapsulePpiGuid ## CONSUMES