public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] UefiPayloadPkg: Support multiple-firmware volume
@ 2022-11-23 10:50 marsx.lin
  2022-11-24  1:10 ` Guo, Gua
  2022-11-25  4:45 ` Lu, James
  0 siblings, 2 replies; 3+ messages in thread
From: marsx.lin @ 2022-11-23 10:50 UTC (permalink / raw)
  To: devel; +Cc: MarsX Lin, Guo Dong, Ray Ni, Sean Rhodes, James Lu, Gua Guo

From: MarsX Lin <marsx.lin@intel.com>

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>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>

Signed-off-by: MarsX Lin <marsx.lin@intel.com>
---
 .../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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] UefiPayloadPkg: Support multiple-firmware volume
  2022-11-23 10:50 [PATCH] UefiPayloadPkg: Support multiple-firmware volume marsx.lin
@ 2022-11-24  1:10 ` Guo, Gua
  2022-11-25  4:45 ` Lu, James
  1 sibling, 0 replies; 3+ messages in thread
From: Guo, Gua @ 2022-11-24  1:10 UTC (permalink / raw)
  To: Lin, MarsX, devel@edk2.groups.io
  Cc: Dong, Guo, Ni, Ray, Rhodes, Sean, Lu, James

Reviewed-by: Gua Guo <gua.guo@intel.com>  

-----Original Message-----
From: Lin, MarsX <marsx.lin@intel.com> 
Sent: Wednesday, November 23, 2022 6:50 PM
To: devel@edk2.groups.io
Cc: Lin, MarsX <marsx.lin@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: [PATCH] UefiPayloadPkg: Support multiple-firmware volume

From: MarsX Lin <marsx.lin@intel.com>

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>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>

Signed-off-by: MarsX Lin <marsx.lin@intel.com>
---
 .../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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] UefiPayloadPkg: Support multiple-firmware volume
  2022-11-23 10:50 [PATCH] UefiPayloadPkg: Support multiple-firmware volume marsx.lin
  2022-11-24  1:10 ` Guo, Gua
@ 2022-11-25  4:45 ` Lu, James
  1 sibling, 0 replies; 3+ messages in thread
From: Lu, James @ 2022-11-25  4:45 UTC (permalink / raw)
  To: Lin, MarsX, devel@edk2.groups.io
  Cc: Dong, Guo, Ni, Ray, Rhodes, Sean, Guo, Gua

Reviewed-by: James Lu <james.lu@intel.com>

-----Original Message-----
From: Lin, MarsX <marsx.lin@intel.com> 
Sent: Wednesday, November 23, 2022 6:50 PM
To: devel@edk2.groups.io
Cc: Lin, MarsX <marsx.lin@intel.com>; Dong, Guo <guo.dong@intel.com>; Ni, Ray <ray.ni@intel.com>; Rhodes, Sean <sean@starlabs.systems>; Lu, James <james.lu@intel.com>; Guo, Gua <gua.guo@intel.com>
Subject: [PATCH] UefiPayloadPkg: Support multiple-firmware volume

From: MarsX Lin <marsx.lin@intel.com>

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>
Cc: James Lu <james.lu@intel.com>
Cc: Gua Guo <gua.guo@intel.com>

Signed-off-by: MarsX Lin <marsx.lin@intel.com>
---
 .../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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-25  4:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-23 10:50 [PATCH] UefiPayloadPkg: Support multiple-firmware volume marsx.lin
2022-11-24  1:10 ` Guo, Gua
2022-11-25  4:45 ` Lu, James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox