diff options
author | MarsX Lin <marsx.lin@intel.com> | 2022-11-23 15:50:06 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2022-12-06 10:13:54 +0000 |
commit | a639248bd0dd1f1ea0b020dd16aab8a7bb76ddd2 (patch) | |
tree | 29452c5753230a9e69e53e43c82ee56ed6250cb4 /UefiPayloadPkg/UefiPayloadEntry | |
parent | 7bee2498910a9034faaf90802c49188afb7582dc (diff) | |
download | edk2-a639248bd0dd1f1ea0b020dd16aab8a7bb76ddd2.tar.gz edk2-a639248bd0dd1f1ea0b020dd16aab8a7bb76ddd2.tar.bz2 edk2-a639248bd0dd1f1ea0b020dd16aab8a7bb76ddd2.zip |
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>
Diffstat (limited to 'UefiPayloadPkg/UefiPayloadEntry')
-rw-r--r-- | UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c index 09aee89680..46ee27c905 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c +++ b/UefiPayloadPkg/UefiPayloadEntry/UniversalPayloadEntry.c @@ -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
|