Re: [edk2] [PATCH 01/14] OvmfPkg: initialize Q35 platform

Subject: Re: [edk2] [PATCH 01/14] OvmfPkg: initialize Q35 platform

From: "Gabriel L. Somlo" <gsomlo@gmail.com>

To: Laszlo Ersek <lersek@redhat.com>

Date: 2014-10-05 04:14:36

Laszlo and/or Jordan:

On Wed, Oct 01, 2014 at 12:31:58AM +0200, Laszlo Ersek wrote:
> On 09/30/14 23:42, Jordan Justen wrote:
> > BaseTimerLib:
> >  * Reads host bridge ID (duplicate code)
> >  * Used for Sec, PeiCore, Pei drivers and DxeCore
> > DxeTimerLib:
> >  * Reads dynamic PCD in constructor
> >  * Used for everything else
> 
> I'm fine with your proposal. The tradeoff is of course DxeCore, and that
> this way the common bits of AcpiTimerLib.c will have to be split out
> into a third .c file, potentially requiring some refactoring. Example:
> OvmfPkg/Library/QemuFwCfgLib.
> 
> [...]
> 
> Let's go with BaseTimerLib / DxeTimerLib.

I'm at the point where I'm about to split/rename AcpiTimerLib.inf into
BaseAcpiTimerLib.inf and DxeTimerLib.inf, and I'm having trouble
emulating existing behavior in the OvmfPkg*.dsc file(s).


For the current AcpiTimerLib, I see this:

  [LibraryClasses]
    ...
    TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
    ...

  [Components]
    ...
    #
    # DXE Phase modules
    #
    ...
    MdeModulePkg/Universal/Metronome/Metronome.inf {
      
        TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
    }

    PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
      
        TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
    }

    IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf {
      
        TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
  !ifdef $(CSM_ENABLE)
        NULL|OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf
  !endif
    }


For QemuFwCfgLib, there's this:

  [LibraryClasses]
    ...
    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgLib.inf
    ...

  [LibraryClasses.common.SEC]
    ...
    QemuFwCfgLib|OvmfPkg/Library/QemuFwCfgLib/QemuFwCfgSecLib.inf
    ...

(and nothing in [Components]).


Then there's PcAtChipsetPkg, with its own AcpiTimerLib split out
into

  "Base" - for SEC, PEI_CORE, and PEIM.

and

  "Dxe" - for DXE_CORE, DXE_DRIVER, DXE_RUNTIME_DRIVER, DXE_SMM_DRIVER,
          UEFI_APPLICATION, UEFI_DRIVER, and SMM_CORE.

I think this looks a lot like what I'm trying to do in OvmfPkg, except
that in PcAtChipsetPkg.dsc, there's:

  [LibraryClasses]
    ...
    TimerLib|PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
    ...

  [Components]
    ...
    PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
    PcAtChipsetPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
    ...


So nothing that would help me come up with a "patter match" based
solution to what I'm supposed to do in OvmfPkg*.dsc :)

I'm going to (re)RTFM the .dsc file format manual, but if you can
help me find a shortcut, that would be much appreciated !

Thanks,
--Gabriel

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel