Jordan, Laszlo: On Mon, Oct 06, 2014 at 11:42:53AM -0400, Gabriel L. Somlo wrote: > So, to decide how I feel about further splitting out DxeAcpiTimerLib > into a version which does use PCDs and another version which does not, > I added some DEBUG statements to track every time the host bridge > gets queried right now, and here's what I got: > > > PlatformPei:MiscInitialization() > Base:AcpiTimerLibConstructor() (PEIM) > Dxe:AcpiTimerLibConstructor() (DXE_CORE) > Dxe:AcpiTimerLibConstructor() (DXE_RUNTIME_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_RUNTIME_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_RUNTIME_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_RUNTIME_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER) > Dxe:AcpiTimerLibConstructor() (UEFI_DRIVER) > Dxe:AcpiTimerLibConstructor() (UEFI_DRIVER) > Dxe:AcpiTimerLibConstructor() (UEFI_DRIVER) > Dxe:AcpiTimerLibConstructor() (UEFI_DRIVER) > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER) > Dxe:AcpiTimerLibConstructor() (UEFI_DRIVER) > BdsPlatform:PciInitialization() > BdsPlatform:AcpiInitialization() > Dxe:AcpiTimerLibConstructor() (DXE_DRIVER)
I think I have the mechanics of PCDs figured out. Between the two of you, you've suggested I use the DxeAcpiTimerLib instance from DXE_DRIVER, DXE_RUNTIME_DRIVER, UEFI_DRIVER, and UEFI_APPLICATION. After some testing, it appears DXE_DRIVER and DXE_RUNTIME_DRIVER do indeed see the dynamic PCD I set from PEI. UEFI_DRIVER *clearly* does not; it gets linked against MdePkg/Library/BasePcdLibNull/PcdLib.c, which implements LibPcdGet* with ASSERT(FALSE). I have no idea about UEFI_APPLICATION, since it never showed up in my tests. Is there an easy way to find out whether it'll work or ASSERT(FALSE) instead ? If not, I'm planning on using PCDs just from DXE_[RUNTIME_]DRIVER, and we can always switch more stages over to DxeAcpiTimerLib from Base later, if that turns out to be possible. Thanks, --Gabriel ------------------------------------------------------------------------------ _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel