Reviewed-by: James Lu <[email protected]> -----Original Message----- From: Lin, MarsX <[email protected]> Sent: Wednesday, November 23, 2022 6:50 PM To: [email protected] Cc: Lin, MarsX <[email protected]>; Dong, Guo <[email protected]>; Ni, Ray <[email protected]>; Rhodes, Sean <[email protected]>; Lu, James <[email protected]>; Guo, Gua <[email protected]> Subject: [PATCH] UefiPayloadPkg: Support multiple-firmware volume
From: MarsX Lin <[email protected]> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4164 To support multiple FVs provided by UPL Cc: Guo Dong <[email protected]> Cc: Ray Ni <[email protected]> Cc: Sean Rhodes <[email protected]> Cc: James Lu <[email protected]> Cc: Gua Guo <[email protected]> Signed-off-by: MarsX Lin <[email protected]> --- .../UefiPayloadEntry/UniversalPayloadEntry.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c index 09aee89680..9df7d3ee19 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c @@ -397,12 +397,21 @@ BuildHobs ( GuidHob = GetFirstGuidHob (&gUniversalPayloadExtraDataGuid); ASSERT (GuidHob != NULL); ExtraData = (UNIVERSAL_PAYLOAD_EXTRA_DATA *)GET_GUID_HOB_DATA (GuidHob); - ASSERT (ExtraData->Count == 1); + DEBUG ((DEBUG_INFO, "Multiple Fv Count=%d\n", ExtraData->Count)); ASSERT (AsciiStrCmp (ExtraData->Entry[0].Identifier, "uefi_fv") == 0); *DxeFv = (EFI_FIRMWARE_VOLUME_HEADER *)(UINTN)ExtraData->Entry[0].Base; ASSERT ((*DxeFv)->FvLength == ExtraData->Entry[0].Size); - + // + // support multiple FVs provided by UPL + // + for (UINT8 idx = 1; idx < ExtraData->Count ; idx++) { + BuildFvHob (ExtraData->Entry[idx].Base, ExtraData->Entry[idx].Size); + DEBUG ((DEBUG_INFO, "UPL Multiple fv[%d], Base=0x%x, size=0x%x\n", + idx, + ExtraData->Entry[idx].Base, + ExtraData->Entry[idx].Size)); + } // // Create guid hob for acpi board information // -- 2.33.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#96624): https://edk2.groups.io/g/devel/message/96624 Mute This Topic: https://groups.io/mt/95222918/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
