OvmfPkg/DxePciLibI440FxQ34: Add UefiBootServicesTableLib dependency

In case PlatformBootManagerLib does not have PciLib dependency,
we need to explicitly depend on UefiBootServicesTableLib.
Otherwise UefiBootServicesTableLib may not be constructed before
DxePciLibI440FxQ35, which uses a constructor-less PcdLib that directly
accesses gBS.

This can be viewed as a bug in the current implementation of BaseTools,
namely GetModuleLibInstances. This function drops all constructor-less
dependencies from the dependency resolution list to avoid dependency
cycles, which at the same time causes issues like above.

To properly fix the issue one should go over each library with
constructors and for each its dependency without constructors add all
the secondary dependencies that do have constructors. While doable,
it may cause considerable performance issues and is thus not done
in this patch.

Signed-off-by: Vitaly Cheptsov <cheptsov@ispras.ru>
This commit is contained in:
Vitaly Cheptsov 2022-03-05 19:28:53 +03:00 committed by Mikhail Krichanov
parent 38645fc308
commit a4bd5b4a35
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@
PcdLib
PciCf8Lib
PciExpressLib
UefiBootServicesTableLib
[Pcd]
gUefiOvmfPkgTokenSpaceGuid.PcdOvmfHostBridgePciDevId