public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Question: GenSec: Generating EFI_SECTION_RAW section
@ 2021-01-28 11:49 Abhishek Shah
  2021-01-28 17:49 ` [edk2-devel] " Laszlo Ersek
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 11:49 UTC (permalink / raw)
  To: devel


[-- Attachment #1.1: Type: text/plain, Size: 1574 bytes --]

Hi All

I have an INF file included in top level dsc and fdf files.
When I compile them, I see output files .pe32/.depex/.ui (under
Output/FV/FFs/)
corresponding to one of the source files (namely AcpiPlatform.c).

For the other source file, which is an asl file (namely SSDT/Ssdt_Sdio.asl);
corresponding aml file is generated, but "GenSec" is not running for that
file.

Expectation is that for the generated aml file, GenSec should generate a
raw section (under Output/FV/FFs/) ,
so that I could use "GetSectionFromFv" API and get the table.
Anything needed to be specified in INF file to generate  EFI_SECTION_RAW
section
or Am I missing something here?

Below is the INF file:
---------------------------------------------------------------------------------
[Defines]
  INF_VERSION                    = 0x00010005
  BASE_NAME                      = AcpiPlatfromDxe
  FILE_GUID                      = 875bd6b6-606f-11eb-bc63-1fc511f35cd9
  MODULE_TYPE                    = DXE_DRIVER
  VERSION_STRING                 = 1.0
  ENTRY_POINT                    = AcpiPlatformEntryPoint

[Sources]
  AcpiPlatform.c
  SSDT/Ssdt_Sdio.asl

[Packages]
  ArmPkg/ArmPkg.dec
  MdePkg/MdePkg.dec
  MdeModulePkg/MdeModulePkg.dec

[LibraryClasses]
  UefiLib
  PcdLib
  DebugLib
  DxeServicesLib
  MemoryAllocationLib
  UefiBootServicesTableLib
  UefiDriverEntryPoint

[Protocols]
  gEfiAcpiTableProtocolGuid                     ## ALWAYS_CONSUMED

[Depex]
  gEfiAcpiTableProtocolGuid
---------------------------------------------------------------------------------

Regards,
Abhishek

[-- Attachment #1.2: Type: text/html, Size: 2090 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4181 bytes --]

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

* Re: [edk2-devel] Question: GenSec: Generating EFI_SECTION_RAW section
  2021-01-28 11:49 Question: GenSec: Generating EFI_SECTION_RAW section Abhishek Shah
@ 2021-01-28 17:49 ` Laszlo Ersek
  2021-01-28 18:10   ` Abhishek Shah
  0 siblings, 1 reply; 4+ messages in thread
From: Laszlo Ersek @ 2021-01-28 17:49 UTC (permalink / raw)
  To: devel, abhishek.shah

On 01/28/21 12:49, Abhishek Shah via groups.io wrote:
> Hi All
> 
> I have an INF file included in top level dsc and fdf files.
> When I compile them, I see output files .pe32/.depex/.ui (under
> Output/FV/FFs/)
> corresponding to one of the source files (namely AcpiPlatform.c).
> 
> For the other source file, which is an asl file (namely SSDT/Ssdt_Sdio.asl);
> corresponding aml file is generated, but "GenSec" is not running for that
> file.
> 
> Expectation is that for the generated aml file, GenSec should generate a
> raw section (under Output/FV/FFs/) ,
> so that I could use "GetSectionFromFv" API and get the table.
> Anything needed to be specified in INF file to generate  EFI_SECTION_RAW
> section
> or Am I missing something here?
> 
> Below is the INF file:
> ---------------------------------------------------------------------------------
> [Defines]
>   INF_VERSION                    = 0x00010005
>   BASE_NAME                      = AcpiPlatfromDxe
>   FILE_GUID                      = 875bd6b6-606f-11eb-bc63-1fc511f35cd9
>   MODULE_TYPE                    = DXE_DRIVER
>   VERSION_STRING                 = 1.0
>   ENTRY_POINT                    = AcpiPlatformEntryPoint
> 
> [Sources]
>   AcpiPlatform.c
>   SSDT/Ssdt_Sdio.asl
> 
> [Packages]
>   ArmPkg/ArmPkg.dec
>   MdePkg/MdePkg.dec
>   MdeModulePkg/MdeModulePkg.dec
> 
> [LibraryClasses]
>   UefiLib
>   PcdLib
>   DebugLib
>   DxeServicesLib
>   MemoryAllocationLib
>   UefiBootServicesTableLib
>   UefiDriverEntryPoint
> 
> [Protocols]
>   gEfiAcpiTableProtocolGuid                     ## ALWAYS_CONSUMED
> 
> [Depex]
>   gEfiAcpiTableProtocolGuid
> ---------------------------------------------------------------------------------

Do you have something like this in your FDF file:

INF  RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf

[Rule.Common.USER_DEFINED.ACPITABLE]
  FILE FREEFORM = $(NAMED_GUID) {
    RAW ACPI               |.acpi
    RAW ASL                |.aml
  }

(This is not an exact answer, just a guess.)

Laszlo


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

* Re: [edk2-devel] Question: GenSec: Generating EFI_SECTION_RAW section
  2021-01-28 17:49 ` [edk2-devel] " Laszlo Ersek
@ 2021-01-28 18:10   ` Abhishek Shah
  2021-01-28 18:29     ` Abhishek Shah
  0 siblings, 1 reply; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 18:10 UTC (permalink / raw)
  To: Laszlo Ersek; +Cc: devel


[-- Attachment #1.1: Type: text/plain, Size: 2501 bytes --]

Hi Laszlo

Thanks for the hint. After adding below (based on inf file posted here),
I am able to see EFI_SECTION_RAW sections getting generated:

[Rule.Common.DXE_DRIVER.ACPITABLE]
  FILE FREEFORM = $(NAMED_GUID) {
    RAW ASL                |.aml
  }


Regards,
Abhishek

On Thu, Jan 28, 2021 at 11:19 PM Laszlo Ersek <lersek@redhat.com> wrote:

> On 01/28/21 12:49, Abhishek Shah via groups.io wrote:
> > Hi All
> >
> > I have an INF file included in top level dsc and fdf files.
> > When I compile them, I see output files .pe32/.depex/.ui (under
> > Output/FV/FFs/)
> > corresponding to one of the source files (namely AcpiPlatform.c).
> >
> > For the other source file, which is an asl file (namely
> SSDT/Ssdt_Sdio.asl);
> > corresponding aml file is generated, but "GenSec" is not running for that
> > file.
> >
> > Expectation is that for the generated aml file, GenSec should generate a
> > raw section (under Output/FV/FFs/) ,
> > so that I could use "GetSectionFromFv" API and get the table.
> > Anything needed to be specified in INF file to generate  EFI_SECTION_RAW
> > section
> > or Am I missing something here?
> >
> > Below is the INF file:
> >
> ---------------------------------------------------------------------------------
> > [Defines]
> >   INF_VERSION                    = 0x00010005
> >   BASE_NAME                      = AcpiPlatfromDxe
> >   FILE_GUID                      = 875bd6b6-606f-11eb-bc63-1fc511f35cd9
> >   MODULE_TYPE                    = DXE_DRIVER
> >   VERSION_STRING                 = 1.0
> >   ENTRY_POINT                    = AcpiPlatformEntryPoint
> >
> > [Sources]
> >   AcpiPlatform.c
> >   SSDT/Ssdt_Sdio.asl
> >
> > [Packages]
> >   ArmPkg/ArmPkg.dec
> >   MdePkg/MdePkg.dec
> >   MdeModulePkg/MdeModulePkg.dec
> >
> > [LibraryClasses]
> >   UefiLib
> >   PcdLib
> >   DebugLib
> >   DxeServicesLib
> >   MemoryAllocationLib
> >   UefiBootServicesTableLib
> >   UefiDriverEntryPoint
> >
> > [Protocols]
> >   gEfiAcpiTableProtocolGuid                     ## ALWAYS_CONSUMED
> >
> > [Depex]
> >   gEfiAcpiTableProtocolGuid
> >
> ---------------------------------------------------------------------------------
>
> Do you have something like this in your FDF file:
>
> INF  RuleOverride=ACPITABLE OvmfPkg/AcpiTables/AcpiTables.inf
>
> [Rule.Common.USER_DEFINED.ACPITABLE]
>   FILE FREEFORM = $(NAMED_GUID) {
>     RAW ACPI               |.acpi
>     RAW ASL                |.aml
>   }
>
> (This is not an exact answer, just a guess.)
>
> Laszlo
>
>

[-- Attachment #1.2: Type: text/html, Size: 3497 bytes --]

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4181 bytes --]

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

* Re: [edk2-devel] Question: GenSec: Generating EFI_SECTION_RAW section
  2021-01-28 18:10   ` Abhishek Shah
@ 2021-01-28 18:29     ` Abhishek Shah
  0 siblings, 0 replies; 4+ messages in thread
From: Abhishek Shah @ 2021-01-28 18:29 UTC (permalink / raw)
  To: Abhishek Shah, devel

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

Cleaner solution seems to be adding below lines under  [Rule.Common.DXE_DRIVER] in fdf file:
RAW ACPI                            Optional    |.acpi
RAW ASL                             Optional    |.aml

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

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

end of thread, other threads:[~2021-01-28 18:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-28 11:49 Question: GenSec: Generating EFI_SECTION_RAW section Abhishek Shah
2021-01-28 17:49 ` [edk2-devel] " Laszlo Ersek
2021-01-28 18:10   ` Abhishek Shah
2021-01-28 18:29     ` Abhishek Shah

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