mirror of https://github.com/acidanthera/audk.git
UefiPayloadPkg: Support multiple firmware volume
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4164 To support multiple FVs provided by UPL Cc: Guo Dong <guo.dong@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Sean Rhodes <sean@starlabs.systems> Reviewed-by: James Lu <james.lu@intel.com> Reviewed-by: Gua Guo <gua.guo@intel.com> Signed-off-by: MarsX Lin <marsx.lin@intel.com>
This commit is contained in:
parent
7bee249891
commit
a639248bd0
|
@ -310,6 +310,7 @@ BuildHobs (
|
|||
UNIVERSAL_PAYLOAD_ACPI_TABLE *AcpiTable;
|
||||
ACPI_BOARD_INFO *AcpiBoardInfo;
|
||||
EFI_HOB_HANDOFF_INFO_TABLE *HobInfo;
|
||||
UINT8 Idx;
|
||||
|
||||
Hob.Raw = (UINT8 *)BootloaderParameter;
|
||||
MinimalNeededSize = FixedPcdGet32 (PcdSystemMemoryUefiRegionSize);
|
||||
|
@ -397,11 +398,24 @@ 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 (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
|
||||
|
|
Loading…
Reference in New Issue