On 2014-10-23 11:53:28, Andrew Fish wrote:
> 
>     On Oct 23, 2014, at 11:20 AM, Laszlo Ersek <ler...@redhat.com> wrote:
> 
> 
>     The only UEFI_DRIVER under OvmfPkg/ that directly depends on TimerLib is
>     QemuVideoDxe (based on the [LibraryClasses] sections in the respective
>     INF files). I grepped the QemuVideoDxe subdir for the five functions
>     that the TimerLib class exports -- no hits. So, even that one *direct*
>     dependency should be bogus.
> 
>     Then, I cross-referenced the TimerLib usages listed in "build.report"
>     with the UEFI_DRIVER module inf files under OvmfPkg, in order to find
>     any indirect dependencies (ie. where a UEFI_DRIVER module inherits a
>     TimerLib dependency via another library instance). The only match was
>     QemuVideoDxe.
> 
>     So this looked like a good idea. I actually eliminated the TimerLib
>     dependency from QemuVideoDxe, restricted the client module types in
>     AcpiTimerLib.inf (so that UEFI_DRIVER would be excluded), and fired off
>     another build.
> 
>     And then:
> 
>     .../OvmfPkg/OvmfPkgX64.dsc(...): error 1001: Module type [UEFI_DRIVER]
>     is not supported by library instance
>     [.../OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.inf]
>            consumed by
>     [.../IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf]
> 
>     I don't think we'll set out to detach UEFI_DRIVERs under
>     IntelFrameworkModulePkg/ from the TimerLib class…
> 
> 
> 
>   "_MicroSecondDelay", referenced from:
>       _KeyboardRead in Ps2KeyboardDxe.lib(Ps2KbdCtrller.obj)
>       _KeyboardWrite in Ps2KeyboardDxe.lib(Ps2KbdCtrller.obj)
>       _KeyboardCommand in Ps2KeyboardDxe.lib(Ps2KbdCtrller.obj)
>       _KeyboardWaitForValue in Ps2KeyboardDxe.lib(Ps2KbdCtrller.obj)
> 
>  MicroSecondDelay (30);
> 
>  It seems strange to use the platform delay routines and not gBS->Stall (30);
> Maybe the package maintainer would know the history here? 

Maybe we could consider a UEFI TimerLib implementation that used
gBS->Stall for MicroSecondDelay and NanoSecondDelay but stubbed out
the rest of TimerLib. They do seem like the most commonly used
elements of TimerLib.

-Jordan

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to