From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cxsh.intel-email.com (cxsh.intel-email.com [121.46.250.151]) by mx.groups.io with SMTP id smtpd.web10.9960.1678415199846501370 for ; Thu, 09 Mar 2023 18:26:41 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@byosoft.com.cn header.s=cloud-union header.b=d3wXyAOB; spf=pass (domain: byosoft.com.cn, ip: 121.46.250.151, mailfrom: gaoliming@byosoft.com.cn) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 8962FDDA7C0 for ; Fri, 10 Mar 2023 10:26:36 +0800 (CST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=byosoft.com.cn; s=cloud-union; t=1678415196; bh=9ULMFPEYFfnDUyf/RLrSEbDktAyUkhzupZ5bM3pxXjM=; h=From:To:References:In-Reply-To:Subject:Date; b=d3wXyAOBn4LUQhS4YRRv79qyIkzymu9WaMPH0IJSr8bD72LW4Y8d8XuVR30bsGZTx Rb0vvlRq3YuTTJLeIdzY96lwUpUJcYBTf4bmHRHxRN+ojH+0yfsOjRVdFWhJ0oMs6h o9oi4LPdbaDGIqGOjEM4yuNgVrXTn0dNPu9OxMRs= Received: from localhost (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 84B04DDA7B0 for ; Fri, 10 Mar 2023 10:26:36 +0800 (CST) Received: from cxsh.intel-email.com (localhost [127.0.0.1]) by cxsh.intel-email.com (Postfix) with ESMTP id 0F42DDDA78E for ; Fri, 10 Mar 2023 10:26:36 +0800 (CST) Authentication-Results: cxsh.intel-email.com; none Received: from mail.byosoft.com.cn (mail.byosoft.com.cn [58.240.74.242]) by cxsh.intel-email.com (Postfix) with SMTP id A5DD2DDA7CD for ; Fri, 10 Mar 2023 10:26:33 +0800 (CST) Received: from DESKTOPS6D0PVI ([58.246.60.130]) (envelope-sender ) by 192.168.6.13 with ESMTP for ; Fri, 10 Mar 2023 10:26:27 +0800 X-WM-Sender: gaoliming@byosoft.com.cn X-Originating-IP: 58.246.60.130 X-WM-AuthFlag: YES X-WM-AuthUser: gaoliming@byosoft.com.cn From: "gaoliming" To: , References: <1747FB5DED91B485.22517@groups.io> <1748979F5D46BCF7.9697@groups.io> In-Reply-To: Subject: =?UTF-8?B?5Zue5aSNOiBbZWRrMi1kZXZlbF0gR2V0U2VjdGlvbkZyb21BbnlGdiBkb2VzbnQgZmluZCBmaWxlIGZyb20gRlY=?= Date: Fri, 10 Mar 2023 10:26:20 +0800 Message-ID: <008a01d952f7$b5fb5f10$21f21d30$@byosoft.com.cn> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQH6sNdfSdDqfPsIAKJAJq3zm8uPvAIyQD7DAdGo9uaukG5D4A== Sender: "gaoliming" Content-Type: multipart/alternative; boundary="----=_NextPart_000_008B_01D9533A.C41FB080" Content-Language: zh-cn ------=_NextPart_000_008B_01D9533A.C41FB080 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable FVMAIN_COMPACT is not reported to DXE. So, it can=E2=80=99t be found in DXE= phase.=20 =20 Thanks Liming =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io = =E4=BB=A3=E8=A1=A8 Alireza Banejad =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B43=E6=9C=882=E6=97=A5 20:= 16 =E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; alibanejad1376@gmail.com =E4=B8=BB=E9=A2=98: Re: [edk2-devel] GetSectionFromAnyFv doesnt find file f= rom FV =20 So, I managed to solve this issue by adding my file to the [FV.DXEFV] secti= on. I don't know why my files aren't found when I add them in [FV.FVMAIN_CO= MPACT] section. =20 =20 On Thu, Mar 2, 2023 at 3:16=E2=80=AFPM Alireza Banejad via groups.io > wrote: Any thoughts? =20 On Tue, Feb 28, 2023 at 3:32=E2=80=AFPM Alireza Banejad via groups.io > wrote: Hi everyone, I have this bmp file which I defined in the FV.FVMAIN_COMPACT section of th= e OvmfPkgX64.fdf file. when I get the a hexdump on the built firmware (OVMF= .fd) I can see the file inside it. but whenever I call the the GetSectionFr= omAnyFv() function from a Application it fails to find the file. This is how I defined the file in OvmfX64.fdf: ____________________________________ [FV.FVMAIN_COMPACT] FvNameGuid =3D 48DB5E17-707C-472D-91CD-1613E7EF51B0 FvAlignment =3D 16 ERASE_POLARITY =3D 1 MEMORY_MAPPED =3D TRUE STICKY_WRITE =3D TRUE LOCK_CAP =3D TRUE LOCK_STATUS =3D TRUE WRITE_DISABLED_CAP =3D TRUE WRITE_ENABLED_CAP =3D TRUE WRITE_STATUS =3D TRUE WRITE_LOCK_CAP =3D TRUE WRITE_LOCK_STATUS =3D TRUE READ_DISABLED_CAP =3D TRUE READ_ENABLED_CAP =3D TRUE READ_STATUS =3D TRUE READ_LOCK_CAP =3D TRUE READ_LOCK_STATUS =3D TRUE FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 { SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = =3D TRUE { # # These firmware volumes will have files placed in them uncompressed, # and then both firmware volumes will be compressed in a single # compression operation in order to achieve better overall compression= . # SECTION FV_IMAGE =3D PEIFV SECTION FV_IMAGE =3D DXEFV } } FILE FREEFORM =3D AFDAEAB5-3F81-4E93-8EE3-228434BA283D { SECTION RAW =3D OemPkg/FrontPage/Resources/FrontpageLogo.bmp } !include FvmainCompactScratchEnd.fdf.inc __________________________________________ =20 and this is how I am using the GetSectionFromAnyFv() function: Status =3D GetSectionFromAnyFv ( FileGuid, EFI_SECTION_RAW, 0, (VOID **)&BMPData, &BMPDataSize ); So there's nothing much to it, yet I still don't know why it fails to find = the file. I also must mention that I checked the GUID being passed to the f= unction and the GUID of the file, they are both the same. I still don't kno= w what's going on ------=_NextPart_000_008B_01D9533A.C41FB080 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

FVMAIN_COMPACT is not reported to DXE. So= , it can=E2=80=99t be found in DXE phase.

 

Thanks

Liming

<= p class=3DMsoNormal>=E5=8F=91=E4=BB=B6=E4=BA=BA:= devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8=A1= =A8 Alireza Banejad
=E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B43= =E6=9C=882=E6=97=A5 20:16
<= /span>=E6=94=B6=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io; alibanejad1376@gmail.com
=E4= =B8=BB=E9=A2=98: Re: [edk2= -devel] GetSectionFromAnyFv doesnt find file from FV

 =

So, I managed to so= lve this issue by adding my file to the [FV.DXEFV] section. I don't know wh= y my files aren't found when I add them in [FV.FVMAIN_COMPACT] section= .

&n= bsp;

 

On Thu, Mar 2, 2023 at 3:16=E2=80=AFPM Alireza Bane= jad via groups.io <alibanejad1376=3Dgmail.com@groups.io> wrote:=

=

Any thoughts?

 =

On Tue, Feb 28, 2023 = at 3:32=E2=80=AFPM Alireza Banejad via groups.io <alibanejad1376=3Dgmail.com@groups.io&= gt; wrote:

Hi everyone,

I have this= bmp file which I defined in the FV.FVMAIN_COMPACT section of the OvmfPkgX6= 4.fdf file. when I get the a hexdump on the built firmware (OVMF.fd) I can = see the file inside it. but whenever I call the the GetSectionFromAnyF= v() function from a Application it fails to find the file.

This is how I defin= ed the file in OvmfX64.fdf:

____________________________________

[FV.FVMAIN_COMPA= CT]
FvNameGuid         =3D 48DB5E17-707C-472D-91CD-1= 613E7EF51B0
FvAlignment        =3D 16
ERASE_POLAR= ITY     =3D 1
MEMORY_MAPPED      =3D TRUE
ST= ICKY_WRITE       =3D TRUE
LOCK_CAP       &= nbsp;   =3D TRUE
LOCK_STATUS        =3D TRUEWRITE_DISABLED_CAP =3D TRUE
WRITE_ENABLED_CAP  =3D TRUE
WRITE_S= TATUS       =3D TRUE
WRITE_LOCK_CAP     =3D TRU= E
WRITE_LOCK_STATUS  =3D TRUE
READ_DISABLED_CAP  =3D TRUEREAD_ENABLED_CAP   =3D TRUE
READ_STATUS       &nbs= p;=3D TRUE
READ_LOCK_CAP      =3D TRUE
READ_LOCK_STATU= S   =3D TRUE




FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8= C4B-E77F1DB2D792 {
   SECTION GUIDED EE4E5898-3914-4259-9D6E-D= C7BD79403CF PROCESSING_REQUIRED =3D TRUE {
     #
&nbs= p;    # These firmware volumes will have files placed in them unc= ompressed,
     # and then both firmware volumes will be = compressed in a single
     # compression operation in or= der to achieve better overall compression.
     #
&nbs= p;    SECTION FV_IMAGE =3D PEIFV
     SECTION F= V_IMAGE =3D DXEFV
   }
 }
  FILE FREEFORM =3D = AFDAEAB5-3F81-4E93-8EE3-228434BA283D {
    SECTION RAW =3D Oem= Pkg/FrontPage/Resources/FrontpageLogo.bmp
  }



!inclu= de FvmainCompactScratchEnd.fdf.inc

__________________________________________<= o:p>

 

and this is how I am using the GetSectionFromAnyFv() function:

  St= atus =3D GetSectionFromAnyFv (
           =  FileGuid,
             EFI_SEC= TION_RAW,
             0,
  &= nbsp;          (VOID **)&BMPData,
  &n= bsp;          &BMPDataSize
    &n= bsp;        );

So there's nothing much to it, yet I still = don't know why it fails to find the file. I also must mention that I checke= d the GUID being passed to the function and the GUID of the file, they are = both the same. I still don't know what's going on

------=_NextPart_000_008B_01D9533A.C41FB080--