On 03/04/16 22:05, Laszlo Ersek wrote: > On 03/04/16 21:38, Jordan Justen wrote: >> On 2016-03-04 06:46:32, Laszlo Ersek wrote: >>> This library is a trivial unification of the following two PciLib >>> instances (and the result is easily diffable against each): >>> - MdePkg/Library/BasePciLibCf8 >>> - MdePkg/Library/BasePciLibPciExpress >>> >> >> Mike, what would you think about a MdePkg/Library/BasePciLibPcieCf8 >> lib instance that selected the access mode by a PCD? Is this too >> platform specific for MdePkg? >> >> Laszlo, if Mike doesn't think this is reasonable for MdePkg, then how >> about the lib name I suggested above instead? In other words make it a >> PCIe vs. CF8 switch, and nothing to do with 440FX vs. Q35. > > Works for me, sure. > > However, the branching would still depend on the OVMF platform type. Is > that okay?
Also, since I intend to support only DXE & later modules with it, I thought you'd want a Dxe* prefix. Thanks Laszlo >>> The PCI config access method is determined in the constructor function, >>> from the dynamic PCD "PcdOvmfHostBridgePciDevId" that is set by >>> PlatformPei. >>> >>> The library instance is usable in DXE phase or later modules: the PciLib >>> instances being unified have no firmware phase / client module type >>> restrictions, and here the only PCD access is made in the constructor >>> function. That is, even before a given client executable's entry point is >>> invoked. >>> >>> The library instance depends on PlatformPei both for setting the PCD >>> mentioned above, and also for enabling MMCONFIG on Q35. PEI and earlier >>> phase modules are not expected to need extended config access even on Q35. >>> >>> Cc: Gabriel Somlo <so...@cmu.edu> >>> Cc: Jordan Justen <jordan.l.jus...@intel.com> >>> Cc: Marcel Apfelbaum <mar...@redhat.com> >>> Cc: MichaĆ Zegan <webczat_...@poczta.onet.pl> >>> Cc: Ruiyu Ni <ruiyu...@intel.com> >>> Contributed-under: TianoCore Contribution Agreement 1.0 >>> Signed-off-by: Laszlo Ersek <ler...@redhat.com> >>> --- >>> OvmfPkg/Library/DxePciLibI440FxQ35/DxePciLibI440FxQ35.inf >>> | 47 ++++++ >>> {MdePkg/Library/BasePciLibCf8 => >>> OvmfPkg/Library/DxePciLibI440FxQ35}/PciLib.c | 161 +++++++++++++++----- >>> 2 files changed, 173 insertions(+), 35 deletions(-) _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel