public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload
@ 2022-12-21 21:24 Guo Dong
  2022-12-21 21:36 ` Sean Rhodes
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Guo Dong @ 2022-12-21 21:24 UTC (permalink / raw)
  To: devel; +Cc: Guo Dong, Ray Ni, Sean Rhodes, James Lu, Gua Guo

From: Guo Dong <guo.dong@intel.com>

BDS module was moved from DXEFV to newly created BDSFV recently.
Non-universal UEFI payload doesn't support multiple FV, so it failed
to boot since BDS module could not be found.
This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set.

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: Guo Dong <guo.dong@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 94ba922244..ee7d718b3f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
 FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {
     SECTION FV_IMAGE = DXEFV
 }
-FILE FV_IMAGE = FBE6C1E3-2F80-4770-88B0-494186E3346F {
-    SECTION FV_IMAGE = BDSFV
-}
 
 ################################################################################
 [FV.BDSFV]
@@ -277,6 +274,10 @@ INF  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
 !endif
 
+!if $(UNIVERSAL_PAYLOAD) == FALSE
+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
+
 #
 # UEFI network modules
 #
-- 
2.35.1.windows.2


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

* Re: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload
  2022-12-21 21:24 [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload Guo Dong
@ 2022-12-21 21:36 ` Sean Rhodes
  2022-12-21 23:07 ` Guo, Gua
  2022-12-22  2:49 ` Lu, James
  2 siblings, 0 replies; 5+ messages in thread
From: Sean Rhodes @ 2022-12-21 21:36 UTC (permalink / raw)
  To: guo.dong; +Cc: devel, Ray Ni, James Lu, Gua Guo

[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]

LGTM but it still hangs on Qemu and real hardware.

Debug build shows:
Building ResourceDescriptorHobs for reserved memory:
0. 0000000000000000 - 0000000000000FFF [10]
buildhob: base = 0x0, size = 0x1000, type = 0x5
1. 0000000000001000 - 000000000009FFFF [01]
2. 00000000000A0000 - 00000000000FFFFF [02]
buildhob: base = 0xA0000, size = 0x60000, type = 0x5
3. 0000000000100000 - 0000000000F4CFFF [01]
4. 0000000000F4D000 - 0000000000FFFFFF [10]
buildhob: base = 0xF4D000, size = 0xB3000, type = 0x5
5. 0000000001000000 - 0000000007FFFFFF [01]
6. 00000000B0000000 - 00000000BFFFFFFF [02]
buildhob: base = 0xB0000000, size = 0x10000000, type = 0x1
Building hob to restrict memory resorces to below 4G.
DxeCoreEntryPoint = 0x4DE7DA1
PayloadEntry: AddressBits=40 5LevelPaging=0 1GPage=0
Pml5=1 Pml4=2 Pdp=512 TotalPage=1027
HandOffToDxeCore() Stack Base: 0x4DAE000, Stack Size: 0x20000

On Wed, 21 Dec 2022 at 21:24, <guo.dong@intel.com> wrote:

> From: Guo Dong <guo.dong@intel.com>
>
> BDS module was moved from DXEFV to newly created BDSFV recently.
> Non-universal UEFI payload doesn't support multiple FV, so it failed
> to boot since BDS module could not be found.
> This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set.
>
> 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: Guo Dong <guo.dong@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf
> b/UefiPayloadPkg/UefiPayloadPkg.fdf
> index 94ba922244..ee7d718b3f 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
>  FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {
>      SECTION FV_IMAGE = DXEFV
>  }
> -FILE FV_IMAGE = FBE6C1E3-2F80-4770-88B0-494186E3346F {
> -    SECTION FV_IMAGE = BDSFV
> -}
>
>
>  ################################################################################
>  [FV.BDSFV]
> @@ -277,6 +274,10 @@ INF
> MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
>  INF
> MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
>  !endif
>
> +!if $(UNIVERSAL_PAYLOAD) == FALSE
> +INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
> +!endif
> +
>  #
>  # UEFI network modules
>  #
> --
> 2.35.1.windows.2
>
>

[-- Attachment #2: Type: text/html, Size: 3604 bytes --]

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

* Re: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload
  2022-12-21 21:24 [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload Guo Dong
  2022-12-21 21:36 ` Sean Rhodes
@ 2022-12-21 23:07 ` Guo, Gua
  2022-12-22  2:49 ` Lu, James
  2 siblings, 0 replies; 5+ messages in thread
From: Guo, Gua @ 2022-12-21 23:07 UTC (permalink / raw)
  To: Dong, Guo, devel@edk2.groups.io; +Cc: Ni, Ray, Rhodes, Sean, Lu, James

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

-----Original Message-----
From: Dong, Guo <guo.dong@intel.com> 
Sent: Thursday, December 22, 2022 5:25 AM
To: devel@edk2.groups.io
Cc: 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: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload

From: Guo Dong <guo.dong@intel.com>

BDS module was moved from DXEFV to newly created BDSFV recently.
Non-universal UEFI payload doesn't support multiple FV, so it failed to boot since BDS module could not be found.
This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set.

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: Guo Dong <guo.dong@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 94ba922244..ee7d718b3f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
 FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {     SECTION FV_IMAGE = DXEFV }-FILE FV_IMAGE = FBE6C1E3-2F80-4770-88B0-494186E3346F {-    SECTION FV_IMAGE = BDSFV-}  ################################################################################ [FV.BDSFV]@@ -277,6 +274,10 @@ INF  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf !endif +!if $(UNIVERSAL_PAYLOAD) == FALSE+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf+!endif+ # # UEFI network modules #--
2.35.1.windows.2


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

* Re: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload
  2022-12-21 21:24 [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload Guo Dong
  2022-12-21 21:36 ` Sean Rhodes
  2022-12-21 23:07 ` Guo, Gua
@ 2022-12-22  2:49 ` Lu, James
  2022-12-22  8:57   ` Sean Rhodes
  2 siblings, 1 reply; 5+ messages in thread
From: Lu, James @ 2022-12-22  2:49 UTC (permalink / raw)
  To: Dong, Guo, devel@edk2.groups.io; +Cc: Ni, Ray, Rhodes, Sean, Guo, Gua

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

-----Original Message-----
From: Dong, Guo <guo.dong@intel.com> 
Sent: Thursday, December 22, 2022 5:25 AM
To: devel@edk2.groups.io
Cc: 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: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload

From: Guo Dong <guo.dong@intel.com>

BDS module was moved from DXEFV to newly created BDSFV recently.
Non-universal UEFI payload doesn't support multiple FV, so it failed to boot since BDS module could not be found.
This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set.

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: Guo Dong <guo.dong@intel.com>
---
 UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayloadPkg.fdf
index 94ba922244..ee7d718b3f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
 FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {     SECTION FV_IMAGE = DXEFV }-FILE FV_IMAGE = FBE6C1E3-2F80-4770-88B0-494186E3346F {-    SECTION FV_IMAGE = BDSFV-}  ################################################################################ [FV.BDSFV]@@ -277,6 +274,10 @@ INF  MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
 INF  MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf !endif +!if $(UNIVERSAL_PAYLOAD) == FALSE+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf+!endif+ # # UEFI network modules #--
2.35.1.windows.2


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

* Re: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload
  2022-12-22  2:49 ` Lu, James
@ 2022-12-22  8:57   ` Sean Rhodes
  0 siblings, 0 replies; 5+ messages in thread
From: Sean Rhodes @ 2022-12-22  8:57 UTC (permalink / raw)
  To: devel, james.lu; +Cc: Dong, Guo, Ni, Ray, Guo, Gua

[-- Attachment #1: Type: text/plain, Size: 2524 bytes --]

Okay, a bit more testing - it seems all debug builds hang at that point. I
tested back to edk2-stable202111 so I think that's a coreboot problem.

Your patch does resolve release builds not booting.

> Could you help to use latest Edk2 repo UPL to reproduce the issue that @Sean
Rhodes <sean@starlabs.systems> encounter from Coreboot + ShimLayer + UPL ?


I'm only testing non-universal payload - the shimlayer doesn't work as
no-one could figure out how to make `ElfCt->FileSize` the right size.

On Thu, 22 Dec 2022 at 02:49, Lu, James <james.lu@intel.com> wrote:

> Reviewed-by: James Lu <james.lu@intel.com>
>
> -----Original Message-----
> From: Dong, Guo <guo.dong@intel.com>
> Sent: Thursday, December 22, 2022 5:25 AM
> To: devel@edk2.groups.io
> Cc: 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: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for
> non-universal payload
>
> From: Guo Dong <guo.dong@intel.com>
>
> BDS module was moved from DXEFV to newly created BDSFV recently.
> Non-universal UEFI payload doesn't support multiple FV, so it failed to
> boot since BDS module could not be found.
> This patch add BDS back to DXEFV when UNIVERSAL_PAYLOAD is not set.
>
> 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: Guo Dong <guo.dong@intel.com>
> ---
>  UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf
> b/UefiPayloadPkg/UefiPayloadPkg.fdf
> index 94ba922244..ee7d718b3f 100644
> --- a/UefiPayloadPkg/UefiPayloadPkg.fdf
> +++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
> @@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
>  FILE FV_IMAGE = 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {     SECTION
> FV_IMAGE = DXEFV }-FILE FV_IMAGE = FBE6C1E3-2F80-4770-88B0-494186E3346F {-
>   SECTION FV_IMAGE = BDSFV-}
> ################################################################################
> [FV.BDSFV]@@ -277,6 +274,10 @@ INF
> MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf
>  INF
> MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf
> !endif +!if $(UNIVERSAL_PAYLOAD) == FALSE+INF
> MdeModulePkg/Universal/BdsDxe/BdsDxe.inf+!endif+ # # UEFI network modules
> #--
> 2.35.1.windows.2
>
>
>
> 
>
>
>

[-- Attachment #2: Type: text/html, Size: 4688 bytes --]

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

end of thread, other threads:[~2022-12-22  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21 21:24 [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload Guo Dong
2022-12-21 21:36 ` Sean Rhodes
2022-12-21 23:07 ` Guo, Gua
2022-12-22  2:49 ` Lu, James
2022-12-22  8:57   ` Sean Rhodes

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