From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181]) by mx.groups.io with SMTP id smtpd.web11.31189.1671658577856538623 for ; Wed, 21 Dec 2022 13:36:18 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@starlabs-systems.20210112.gappssmtp.com header.s=20210112 header.b=Y7guEvoI; spf=pass (domain: starlabs.systems, ip: 209.85.219.181, mailfrom: sean@starlabs.systems) Received: by mail-yb1-f181.google.com with SMTP id g4so17994103ybg.7 for ; Wed, 21 Dec 2022 13:36:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=starlabs-systems.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=gpH1S2SieDO0PXJVXUFUJslX5NI+YDKdugDNSssvGHw=; b=Y7guEvoI+VS1pz1mpWLS1bYt3O36McEGAjFAcU2uRzHmHBKETE46TEZQSTQfk0XZ8x zmODS6FoJSAWfICP1MfcwvmPxWvpFprCB5ywP/a4qayAa+XTce4lRRzkHb8aq6UI1aAM QX59mQUAUrP2OIdTms2YzbPZFGhK5ERnA7WXRqOPX4lFAcWKYM9kNJ15fXwncyvY30b1 4kpmv2ghjcoKWuNPcfhUox6E+6MLQLXuPNJZAzv5YZ4MjFjcQzmhxtYPNMPYGQvSE9Df A1YNZZJQa4Xrdrv6r8zYd+kqaxanWDa+fTnFWLhhsqbsXFEPUiahYA8btTkjypMZd9PT GthA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gpH1S2SieDO0PXJVXUFUJslX5NI+YDKdugDNSssvGHw=; b=3tVHbvVfESOdbF/2hSv3HG4nGp9dIElf3iL7hnL+XqE4rmbiDR63YDAmjHJaa0O4XS a1V5ibdm30qRylLG5q5SUr3S8/3o5kAG6sog0qajCsQRH8+Q/yOuAojjEBdhmE3VC56M rYvFI8qnJx2IUKPHKsylMZuv1jAiIXiuaZg/oqgqIian11bis5xEOb31XyIr86vXQ3Uz 9/ou1auMMrqeQ2Rryg4ZEo0ZO6ahfoGqyx510UXb4WWfZ69vEsAqleaOYLdFCH1zIolu tffP4yid7aHIvXf/VsaXgkC2BgX9kDn4N3qQj9MyplDD1RMb+Q/YGhk5XlZ7+T/ZT3Zi Dx9w== X-Gm-Message-State: AFqh2krBDSf+szH3iqohK1arrE3SFoNFheGGnZrrNt5i7yzJr/wK82H3 3oZEvG/BxkppdXePWzzlfvJTxLlX5Q8/170dF5Jt X-Google-Smtp-Source: AMrXdXs+pvNAX26V3VKBwUIv8dp8t3sXikH5uZbGW0kt2ii6LcKeYZFpnO382t3eYquq1hml23HY9cPXk/ai3a8k9U0= X-Received: by 2002:a25:9ac9:0:b0:74d:d1c0:e2a7 with SMTP id t9-20020a259ac9000000b0074dd1c0e2a7mr345901ybo.184.1671658576884; Wed, 21 Dec 2022 13:36:16 -0800 (PST) MIME-Version: 1.0 References: <20221221212433.1028-1-guo.dong@intel.com> In-Reply-To: <20221221212433.1028-1-guo.dong@intel.com> From: "Sean Rhodes" Date: Wed, 21 Dec 2022 21:36:05 +0000 Message-ID: Subject: Re: [edk2-devel][PATCH] UefiPayloadPkg: Fix boot issue for non-universal payload To: guo.dong@intel.com Cc: devel@edk2.groups.io, Ray Ni , James Lu , Gua Guo Content-Type: multipart/alternative; boundary="000000000000a94c0b05f05d5772" --000000000000a94c0b05f05d5772 Content-Type: text/plain; charset="UTF-8" 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, wrote: > From: Guo Dong > > 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 > Cc: Sean Rhodes > Cc: James Lu > Cc: Gua Guo > Signed-off-by: Guo Dong > --- > 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 > > --000000000000a94c0b05f05d5772 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
LGTM but it still hangs on Qemu and real hardware.
Debug build shows:
Building ResourceDescriptorHobs for reserve= d memory:
0. 0000000000000000 - 0000000000000FFF [10]
buildhob: base = =3D 0x0, size =3D 0x1000, type =3D 0x5
1. 0000000000001000 - 00000000000= 9FFFF [01]
2. 00000000000A0000 - 00000000000FFFFF [02]
buildhob: base= =3D 0xA0000, size =3D 0x60000, type =3D 0x5
3. 0000000000100000 - 00000= 00000F4CFFF [01]
4. 0000000000F4D000 - 0000000000FFFFFF [10]
buildhob= : base =3D 0xF4D000, size =3D 0xB3000, type =3D 0x5
5. 0000000001000000 = - 0000000007FFFFFF [01]
6. 00000000B0000000 - 00000000BFFFFFFF [02]
b= uildhob: base =3D 0xB0000000, size =3D 0x10000000, type =3D 0x1
Building= hob to restrict memory resorces to below 4G.
DxeCoreEntryPoint =3D 0x4D= E7DA1
PayloadEntry: AddressBits=3D40 5LevelPaging=3D0 1GPage=3D0
Pml5= =3D1 Pml4=3D2 Pdp=3D512 TotalPage=3D1027
HandOffToDxeCore() Stack Base: = 0x4DAE000, Stack Size: 0x20000

On Wed, 21 Dec 2022 at 21:24, <<= a href=3D"mailto:guo.dong@intel.com" target=3D"_blank">guo.dong@intel.com> wrote:
Fr= om: Guo Dong <gu= o.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 <ja= mes.lu@intel.com>
Cc: Gua Guo <gua.= guo@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
---
=C2=A0UefiPayloadPkg/UefiPayloadPkg.fdf | 7 ++++---
=C2=A01 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkg.fdf b/UefiPayloadPkg/UefiPayload= Pkg.fdf
index 94ba922244..ee7d718b3f 100644
--- a/UefiPayloadPkg/UefiPayloadPkg.fdf
+++ b/UefiPayloadPkg/UefiPayloadPkg.fdf
@@ -59,9 +59,6 @@ INF UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf<= br> =C2=A0FILE FV_IMAGE =3D 4E35FD93-9C72-4c15-8C4B-E77F1DB2D793 {
=C2=A0 =C2=A0 =C2=A0SECTION FV_IMAGE =3D DXEFV
=C2=A0}
-FILE FV_IMAGE =3D FBE6C1E3-2F80-4770-88B0-494186E3346F {
-=C2=A0 =C2=A0 SECTION FV_IMAGE =3D BDSFV
-}

=C2=A0#####################################################################= ###########
=C2=A0[FV.BDSFV]
@@ -277,6 +274,10 @@ INF=C2=A0 MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/= AcpiPlatformDxe.inf
=C2=A0INF=C2=A0 MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/Bo= otGraphicsResourceTableDxe.inf
=C2=A0!endif

+!if $(UNIVERSAL_PAYLOAD) =3D=3D FALSE
+INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+!endif
+
=C2=A0#
=C2=A0# UEFI network modules
=C2=A0#
--
2.35.1.windows.2

--000000000000a94c0b05f05d5772--