public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] GetSectionFromAnyFv doesnt find file from FV
       [not found] <1747FB5DED91B485.22517@groups.io>
@ 2023-03-02 11:46 ` Alireza Banejad
       [not found] ` <1748979F5D46BCF7.9697@groups.io>
  1 sibling, 0 replies; 3+ messages in thread
From: Alireza Banejad @ 2023-03-02 11:46 UTC (permalink / raw)
  To: devel, alibanejad1376

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

Any thoughts?

On Tue, Feb 28, 2023 at 3:32 PM Alireza Banejad via groups.io
<alibanejad1376=gmail.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 GetSectionFromAnyFv() function from a Application it fails to find the
> file.
> This is how I defined the file in OvmfX64.fdf:
> ____________________________________
> [FV.FVMAIN_COMPACT]
> FvNameGuid         = 48DB5E17-707C-472D-91CD-1613E7EF51B0
> FvAlignment        = 16
> ERASE_POLARITY     = 1
> MEMORY_MAPPED      = TRUE
> STICKY_WRITE       = TRUE
> LOCK_CAP           = TRUE
> LOCK_STATUS        = TRUE
> WRITE_DISABLED_CAP = TRUE
> WRITE_ENABLED_CAP  = TRUE
> WRITE_STATUS       = TRUE
> WRITE_LOCK_CAP     = TRUE
> WRITE_LOCK_STATUS  = TRUE
> READ_DISABLED_CAP  = TRUE
> READ_ENABLED_CAP   = TRUE
> READ_STATUS        = TRUE
> READ_LOCK_CAP      = TRUE
> READ_LOCK_STATUS   = TRUE
>
>
>
>
> FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
>    SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED
> = 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 = PEIFV
>      SECTION FV_IMAGE = DXEFV
>    }
>  }
>   FILE FREEFORM = AFDAEAB5-3F81-4E93-8EE3-228434BA283D {
>     SECTION RAW = OemPkg/FrontPage/Resources/FrontpageLogo.bmp
>   }
>
>
>
> !include FvmainCompactScratchEnd.fdf.inc
> __________________________________________
>
> and this is how I am using the GetSectionFromAnyFv() function:
>   Status = 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
> 
>
>

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

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

* Re: [edk2-devel] GetSectionFromAnyFv doesnt find file from FV
       [not found] ` <1748979F5D46BCF7.9697@groups.io>
@ 2023-03-02 12:15   ` Alireza Banejad
  2023-03-10  2:26     ` 回复: " gaoliming
  0 siblings, 1 reply; 3+ messages in thread
From: Alireza Banejad @ 2023-03-02 12:15 UTC (permalink / raw)
  To: devel, alibanejad1376

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

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 PM Alireza Banejad via groups.io
<alibanejad1376=gmail.com@groups.io> wrote:

> Any thoughts?
>
> On Tue, Feb 28, 2023 at 3:32 PM Alireza Banejad via groups.io
> <alibanejad1376=gmail.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 GetSectionFromAnyFv() function from a Application it fails to find the
>> file.
>> This is how I defined the file in OvmfX64.fdf:
>> ____________________________________
>> [FV.FVMAIN_COMPACT]
>> FvNameGuid         = 48DB5E17-707C-472D-91CD-1613E7EF51B0
>> FvAlignment        = 16
>> ERASE_POLARITY     = 1
>> MEMORY_MAPPED      = TRUE
>> STICKY_WRITE       = TRUE
>> LOCK_CAP           = TRUE
>> LOCK_STATUS        = TRUE
>> WRITE_DISABLED_CAP = TRUE
>> WRITE_ENABLED_CAP  = TRUE
>> WRITE_STATUS       = TRUE
>> WRITE_LOCK_CAP     = TRUE
>> WRITE_LOCK_STATUS  = TRUE
>> READ_DISABLED_CAP  = TRUE
>> READ_ENABLED_CAP   = TRUE
>> READ_STATUS        = TRUE
>> READ_LOCK_CAP      = TRUE
>> READ_LOCK_STATUS   = TRUE
>>
>>
>>
>>
>> FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
>>    SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF
>> PROCESSING_REQUIRED = 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 = PEIFV
>>      SECTION FV_IMAGE = DXEFV
>>    }
>>  }
>>   FILE FREEFORM = AFDAEAB5-3F81-4E93-8EE3-228434BA283D {
>>     SECTION RAW = OemPkg/FrontPage/Resources/FrontpageLogo.bmp
>>   }
>>
>>
>>
>> !include FvmainCompactScratchEnd.fdf.inc
>> __________________________________________
>>
>> and this is how I am using the GetSectionFromAnyFv() function:
>>   Status = 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
>>
>> 
>
>

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

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

* 回复: [edk2-devel] GetSectionFromAnyFv doesnt find file from FV
  2023-03-02 12:15   ` Alireza Banejad
@ 2023-03-10  2:26     ` gaoliming
  0 siblings, 0 replies; 3+ messages in thread
From: gaoliming @ 2023-03-10  2:26 UTC (permalink / raw)
  To: devel, alibanejad1376

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

FVMAIN_COMPACT is not reported to DXE. So, it can’t be found in DXE phase. 

 

Thanks

Liming

发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Alireza Banejad
发送时间: 2023年3月2日 20:16
收件人: devel@edk2.groups.io; alibanejad1376@gmail.com
主题: Re: [edk2-devel] GetSectionFromAnyFv doesnt find file from FV

 

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 PM Alireza Banejad via groups.io <http://groups.io>  <alibanejad1376=gmail.com@groups.io <mailto:gmail.com@groups.io> > wrote:

Any thoughts?

 

On Tue, Feb 28, 2023 at 3:32 PM Alireza Banejad via groups.io <http://groups.io>  <alibanejad1376=gmail.com@groups.io <mailto:gmail.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 GetSectionFromAnyFv() function from a Application it fails to find the file.

This is how I defined the file in OvmfX64.fdf:

____________________________________

[FV.FVMAIN_COMPACT]
FvNameGuid         = 48DB5E17-707C-472D-91CD-1613E7EF51B0
FvAlignment        = 16
ERASE_POLARITY     = 1
MEMORY_MAPPED      = TRUE
STICKY_WRITE       = TRUE
LOCK_CAP           = TRUE
LOCK_STATUS        = TRUE
WRITE_DISABLED_CAP = TRUE
WRITE_ENABLED_CAP  = TRUE
WRITE_STATUS       = TRUE
WRITE_LOCK_CAP     = TRUE
WRITE_LOCK_STATUS  = TRUE
READ_DISABLED_CAP  = TRUE
READ_ENABLED_CAP   = TRUE
READ_STATUS        = TRUE
READ_LOCK_CAP      = TRUE
READ_LOCK_STATUS   = TRUE




FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
   SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = 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 = PEIFV
     SECTION FV_IMAGE = DXEFV
   }
 }
  FILE FREEFORM = AFDAEAB5-3F81-4E93-8EE3-228434BA283D {
    SECTION RAW = OemPkg/FrontPage/Resources/FrontpageLogo.bmp
  }



!include FvmainCompactScratchEnd.fdf.inc

__________________________________________

 

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

  Status = 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




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

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

end of thread, other threads:[~2023-03-10  2:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1747FB5DED91B485.22517@groups.io>
2023-03-02 11:46 ` [edk2-devel] GetSectionFromAnyFv doesnt find file from FV Alireza Banejad
     [not found] ` <1748979F5D46BCF7.9697@groups.io>
2023-03-02 12:15   ` Alireza Banejad
2023-03-10  2:26     ` 回复: " gaoliming

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