On Sat, Oct 4, 2014 at 5:14 PM, Gabriel L. Somlo <[email protected]> wrote:
> 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 {
> <LibraryClasses>
> TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
Remove this.
> }
>
>
> PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcatRealTimeClockRuntimeDxe.inf {
> <LibraryClasses>
> TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
Remove this.
> }
>
> IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf {
> <LibraryClasses>
> TimerLib|OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf
Remove this.
> !ifdef $(CSM_ENABLE)
> NULL|OvmfPkg/Csm/CsmSupportLib/CsmSupportLib.inf
> !endif
> }
Can you make three versions?
OvmfPkg/Library/AcpiTimerLib/BaseRomAcpiTimerLib.inf
OvmfPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.inf
OvmfPkg/Library/AcpiTimerLib/DxeAcpiTimerLib.inf
Set BaseAcpiTimerLib.inf as default under:
[LibraryClasses]
Use BaseRomAcpiTimerLib.inf for:
[LibraryClasses.common.SEC]
Use DxeAcpiTimerLib.inf version for these:
[LibraryClasses.common.UEFI_DRIVER]
[LibraryClasses.common.DXE_DRIVER]
[LibraryClasses.common.UEFI_APPLICATION]
BaseRomAcpiTimerLib.inf
* Shares a common file with BaseAcpiTimerLib.inf for reading the host
bus to determine the system type.
* Reads host bus every time, and doesn't set any global variables
BaseAcpiTimerLib.inf
* Shares a common file with BaseAcpiTimerLib.inf for reading the host
bus to determine the system type.
* Sets a global module variable that allows the library to not have
to read the host bus id every time.
DxeAcpiTimerLib.inf
* Read the PCD once and save it in a global module variable
PlatformPei should also read the host bus id, and set a PCD to allow
DxeAcpiTimerLib.inf to work.
Thanks,
-Jordan
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel