From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web10.13563.1677759352441254126 for ; Thu, 02 Mar 2023 04:15:52 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=OxTA4oGX; spf=pass (domain: gmail.com, ip: 209.85.167.45, mailfrom: alibanejad1376@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id f18so21869061lfa.3 for ; Thu, 02 Mar 2023 04:15:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=yFdx6OhuZxWHBiJtzGpnQBaknM0zNwGrBhlbQOHpYFE=; b=OxTA4oGXQwXtTrZYSF3qIs+QvzhsIAPmwc5yF2LIAUrSIkHaXHMILxDghiNrXNB10X nKPeYmtTGsSLMXnU+4d2tvFKZZQqD1CrUZ4Xdmr2mABuG+gjmlDBQk3m2aipp3hqypgx 46mdxvC2/PvG/3bGQhx88qhvZOfDK8dyGcYKePVJXHLZPAQejsJdWpExQ1xDLBUhnPch 8AMA/7NYwRSABp5IkiUW98rE1ipu+HOvJhuLUnSTm98g+ErS30T6x6i/jJ7s9JITT1hi TaWJ+byLzpqTG7aA2salxZoq+R2JkrcKj/cyQoAzhX3zKiAIT7EqeIKMi2UAbNPAfDY6 izTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=yFdx6OhuZxWHBiJtzGpnQBaknM0zNwGrBhlbQOHpYFE=; b=rnnLY3KGUSfadkL1AfOK0vv40VWEL0RmGldOGjeei39yyQ/Zfoaawm3GKHy5zfx+KF 224kfXUxMYNd2Yv1jjdHwUaM/VDkIcU2XhGkBR/kyzdYev7VjHS5rNbzawKiU3es6syW EOYVIt1n/zOx7WRvs609MJjMOojE7/HlN3IC0ZBtTOS3qaWoOuRr5NDB/AjKFesenQJL PDgOV9EPX5K+jqiIUaeYQoR2Vovg9UP7uBaoH+0KJDsiX3aHFHVHYuUu5ldQnnLKRZwg dODb69f0dOG22QEoCY+/1m/fs72HsEh71RvaHOHz4mzi8rP9iTC+f1SuUc4eOL395SCa aNLQ== X-Gm-Message-State: AO0yUKXVU6ExdhgUYw6eBsHBNpNGEQcvp6iKUnbyNbkR/Lv7ftSV/DZU tbPbasri2QiIm48FT47HpL7Q3iN2LYv/llQuKYDJF+6uwsFtqn3H X-Google-Smtp-Source: AK7set9YZLlIp/Z8DhLI6RFGYW/v3zxZdvXktmbI7GJPgxL3Te/zZ+MlqH/83O8mjMWcuU+nD1R/uGeSFURKMHR5t5k= X-Received: by 2002:ac2:4426:0:b0:4db:37ff:f5d0 with SMTP id w6-20020ac24426000000b004db37fff5d0mr647753lfl.1.1677759349836; Thu, 02 Mar 2023 04:15:49 -0800 (PST) MIME-Version: 1.0 References: <1747FB5DED91B485.22517@groups.io> <1748979F5D46BCF7.9697@groups.io> In-Reply-To: <1748979F5D46BCF7.9697@groups.io> From: "Alireza Banejad" Date: Thu, 2 Mar 2023 15:45:48 +0330 Message-ID: Subject: Re: [edk2-devel] GetSectionFromAnyFv doesnt find file from FV To: devel@edk2.groups.io, alibanejad1376@gmail.com Content-Type: multipart/alternative; boundary="00000000000010ceee05f5e9caa1" --00000000000010ceee05f5e9caa1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable So, I managed to solve this issue by adding my file to the [FV.DXEFV] section. I don't know why my files aren't found when I add them in [FV.FVMAIN_COMPACT] section. On Thu, Mar 2, 2023 at 3:16=E2=80=AFPM Alireza Banejad via groups.io wrote: > Any thoughts? > > 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 >> the 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 GetSectionFromAnyFv() function from a Application it fails to find t= he >> 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 uncompresse= d, >> # 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 >> __________________________________________ >> >> 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 function and the GUID of the file, they are both the same. I still >> don't know what's going on >> >>=20 > > --00000000000010ceee05f5e9caa1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
So, I managed to solve this issue by adding my file to the= [FV.DXEFV] section. I don't know why my files aren't found when I = add them in=C2=A0[FV.FVMAIN_COMPACT] section.


On Thu, Mar 2, = 2023 at 3:16=E2=80=AFPM Alireza Banejad via gr= oups.io <alibanejad1376=3Dgma= il.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> wrote:
Hi everyone,
I= have this bmp file which I defined in the FV.FVMAIN_COMPACT section of the= 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=C2=A0GetSecti= onFromAnyFv() function from a Application it fails to find the file.
<= div>This is how I defined the file in OvmfX64.fdf:
______________= ______________________
[FV.FVMAIN_COMPACT]
FvNameGuid =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =3D 48DB5E17-707C-472D-91CD-1613E7EF51B0
FvAlignmen= t =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D 16
ERASE_POLARITY =C2=A0 =C2=A0 =3D 1MEMORY_MAPPED =C2=A0 =C2=A0 =C2=A0=3D TRUE
STICKY_WRITE =C2=A0 =C2=A0 = =C2=A0 =3D TRUE
LOCK_CAP =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D TRUE
= LOCK_STATUS =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D TRUE
WRITE_DISABLED_CAP =3D T= RUE
WRITE_ENABLED_CAP =C2=A0=3D TRUE
WRITE_STATUS =C2=A0 =C2=A0 =C2= =A0 =3D TRUE
WRITE_LOCK_CAP =C2=A0 =C2=A0 =3D TRUE
WRITE_LOCK_STATUS = =C2=A0=3D TRUE
READ_DISABLED_CAP =C2=A0=3D TRUE
READ_ENABLED_CAP =C2= =A0 =3D TRUE
READ_STATUS =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D TRUE
READ_LOC= K_CAP =C2=A0 =C2=A0 =C2=A0=3D TRUE
READ_LOCK_STATUS =C2=A0 =3D TRUE
<= br>


FILE FV_IMAGE =3D 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
= =C2=A0 =C2=A0SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING= _REQUIRED =3D TRUE {
=C2=A0 =C2=A0 =C2=A0#
=C2=A0 =C2=A0 =C2=A0# Thes= e firmware volumes will have files placed in them uncompressed,
=C2=A0 = =C2=A0 =C2=A0# and then both firmware volumes will be compressed in a singl= e
=C2=A0 =C2=A0 =C2=A0# compression operation in order to achieve better= overall compression.
=C2=A0 =C2=A0 =C2=A0#
=C2=A0 =C2=A0 =C2=A0SECTI= ON FV_IMAGE =3D PEIFV
=C2=A0 =C2=A0 =C2=A0SECTION FV_IMAGE =3D DXEFV
= =C2=A0 =C2=A0}
=C2=A0}
=C2=A0 FILE FREEFORM =3D AFDAEAB5-3F81-4E93-8E= E3-228434BA283D {
=C2=A0 =C2=A0 SECTION RAW =3D OemPkg/FrontPage/Resourc= es/FrontpageLogo.bmp
=C2=A0 }



!include FvmainCompactScrat= chEnd.fdf.inc
__________________________________________

and this is how I am using the=C2=A0GetSectionFromAnyF= v() function:
=C2=A0 Status =3D GetSectionFromAnyFv (
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0FileGuid,
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0EFI_SECTION_RAW,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A00,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= VOID **)&BMPData,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&a= mp;BMPDataSize
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0);
So there's nothing much to it, yet I still don't know why i= t fails to find the file. I also must mention that I checked 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

--00000000000010ceee05f5e9caa1--