From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3E7B874004C for ; Wed, 5 Jun 2024 14:19:13 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=e1dfvQ+nwBhhnqrZ+cIepyEDwLEgaSzOo3mKn33B2SQ=; c=relaxed/simple; d=groups.io; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:To:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20240206; t=1717597152; v=1; b=oG1szL8dzoNCpQAqRak3XMs/S+7plv6ibEomMtIVQoB65NxolwSyaWoZqY75P47TFH1pylZl rcI+HKHma13Y6Ztuv5Az8TgttfBgjmZFLFEji+mfbnjkqrNwfjyumBDQL6wyRLP3qSoCuxZ1/o0 7r739Xg5N1W4yJM+3/KYWSCDw63uDGtjh/QvPQUx0ow2Xhek6UrrvSEDLNsF3AYAP1hXQfFL9Yp C0nVVuEAxOsXFebQUlr93eR9KAQzZ6fMq0JV/6ZjRIdD2ICND4qWLFn701veqCLG4qV2bUQZVYL VNM4jtksG4ZshrfhjkHsKk0t25bdF58WSmnLg6rmkVQtQ== X-Received: by 127.0.0.2 with SMTP id yfTTYY7687511xkUWgFER7j1; Wed, 05 Jun 2024 07:19:11 -0700 X-Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by mx.groups.io with SMTP id smtpd.web11.16715.1717597145796468825 for ; Wed, 05 Jun 2024 07:19:06 -0700 X-Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a63359aaaa6so727866b.2 for ; Wed, 05 Jun 2024 07:19:05 -0700 (PDT) X-Gm-Message-State: WFDtaDXNoLU3GXNmChv49844x7686176AA= X-Google-Smtp-Source: AGHT+IHQtqe7cbDcstYzxWWwRrg2v3rU32TxYwhuVJACOPijezbyauac1i0LuzP+9oIsv3OLHVR35HKIme2nvWsz4NY= X-Received: by 2002:a17:906:f0ce:b0:a68:f8b9:ffa3 with SMTP id a640c23a62f3a-a699f681a9dmr188774566b.46.1717597143676; Wed, 05 Jun 2024 07:19:03 -0700 (PDT) MIME-Version: 1.0 References: <81470919d07dd3968c96f378340a032778cedb34.camel@siemens.com> In-Reply-To: <81470919d07dd3968c96f378340a032778cedb34.camel@siemens.com> From: "Lean Sheng Tan" Date: Wed, 5 Jun 2024 16:18:27 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH] UefiPayloadPkg: Fix LoadDxeCore for payload size > 16MB To: devel@edk2.groups.io, sebastian.witt@siemens.com, "Guo, Gua" , Sean Rhodes , "Lu, James" , "Dong, Guo" Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Resent-Date: Wed, 05 Jun 2024 07:19:06 -0700 Resent-From: sheng.tan@9elements.com Reply-To: devel@edk2.groups.io,sheng.tan@9elements.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Type: multipart/alternative; boundary="0000000000009dcf36061a253fd2" X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=oG1szL8d; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=9elements.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io --0000000000009dcf36061a253fd2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable + edk2 payload maintainers Best Regards, *Lean Sheng Tan* 9elements GmbH, Kortumstra=C3=9Fe 19-21, 44787 Bochum, Germany Email: sheng.tan@9elements.com Phone: *+49 234 68 94 188 <+492346894188>* Mobile: *+49 176 76 113842 <+4917676113842>* Registered office: Bochum Commercial register: Amtsgericht Bochum, HRB 17519 Management: Sebastian German, Eray Bazaar Data protection information according to Art. 13 GDPR On Mon, 3 Jun 2024 at 23:20, Witt, Sebastian via groups.io wrote: > > Fix calculation of first section in FileFindSection for FILE2 headers in > UefiPayloadEntry module. > > Signed-of-by: Sebastian Witt > --- > UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > index 898d610951..9cb6edefcf 100644 > --- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > +++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c > @@ -211,13 +211,14 @@ FileFindSection ( > > if (IS_FFS_FILE2 (FileHeader)) { > FileSize =3D FFS_FILE2_SIZE (FileHeader); > + Section =3D (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEADER2 > *)FileHeader) + 1); > } else { > FileSize =3D FFS_FILE_SIZE (FileHeader); > + Section =3D (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); > } > > FileSize -=3D sizeof (EFI_FFS_FILE_HEADER); > > - Section =3D (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); > Index =3D 0; > while (Index < FileSize) { > if (Section->Type =3D=3D SectionType) { > -- > 2.39.2 > > > >=20 > > > -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#119472): https://edk2.groups.io/g/devel/message/119472 Mute This Topic: https://groups.io/mt/106471262/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- --0000000000009dcf36061a253fd2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
+ edk2 payload maintainers=C2=A0

= Best Regards,
Lean Sheng Tan



9elements GmbH, Kortumstra= =C3=9Fe 19-21, 44787 Bochum, Germany

=
Registered office: Bochum
Commercial register: Amtsgericht= Bochum, HRB 17519
Mana= gement: Sebastian German, Eray Bazaar
<= /div>


On Mon, 3 Jun 2024 at 23:20, Witt, Sebasti= an via groups.io <sebastian.witt=3Dsiemens.com@groups.io> wrote:

Fix calculation of first section in FileFindSection for FILE2 headers in Ue= fiPayloadEntry module.

Signed-of-by: Sebastian Witt <sebastian.witt@siemens.com>
---
=C2=A0UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c | 3 ++-
=C2=A01 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c b/UefiPayloadPkg= /UefiPayloadEntry/LoadDxeCore.c
index 898d610951..9cb6edefcf 100644
--- a/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
+++ b/UefiPayloadPkg/UefiPayloadEntry/LoadDxeCore.c
@@ -211,13 +211,14 @@ FileFindSection (

=C2=A0 =C2=A0if (IS_FFS_FILE2 (FileHeader)) {
=C2=A0 =C2=A0 =C2=A0FileSize =3D FFS_FILE2_SIZE (FileHeader);
+=C2=A0 =C2=A0 Section =3D (EFI_COMMON_SECTION_HEADER *)(((EFI_FFS_FILE_HEA= DER2 *)FileHeader) + 1);
=C2=A0 =C2=A0} else {
=C2=A0 =C2=A0 =C2=A0FileSize =3D FFS_FILE_SIZE (FileHeader);
+=C2=A0 =C2=A0 Section =3D (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1); =C2=A0 =C2=A0}

=C2=A0 =C2=A0FileSize -=3D sizeof (EFI_FFS_FILE_HEADER);

-=C2=A0 Section =3D (EFI_COMMON_SECTION_HEADER *)(FileHeader + 1);
=C2=A0 =C2=A0Index=C2=A0 =C2=A0=3D 0;
=C2=A0 =C2=A0while (Index < FileSize) {
=C2=A0 =C2=A0 =C2=A0if (Section->Type =3D=3D SectionType) {
--
2.39.2






_._,_._,_

Groups.io Links:

=20 You receive all messages sent to this group. =20 =20

View/Reply Online (#119472) | =20 | Mute= This Topic | New Topic
Your Subscriptio= n | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_
--0000000000009dcf36061a253fd2--