mirror of https://github.com/acidanthera/audk.git
CorebootPayloadPkg: Allow PciLib instance selection
On old platform without PCIe express support, the PciLib needs to be mapped to PciLibCf8 instance to make it work. On new platform with PCIe express support, the PciLib needs to be mapped to PciLibPciExpress to allow access to extended PCIe configuration space. This patch allows to select the PciLib instance between PciLibCf8 and PciLibPciExpress using the PCIE_BASE macro through build command line. Cc: Prince Agyeman <prince.agyeman@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Maurice Ma <maurice.ma@intel.com> Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
This commit is contained in:
parent
5ea2bad0d9
commit
28b3a713b6
|
@ -129,8 +129,13 @@
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
|
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
|
||||||
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
||||||
|
!if $(PCIE_BASE) == 0
|
||||||
|
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
|
||||||
|
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
|
||||||
|
!else
|
||||||
PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
|
PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
|
||||||
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
|
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
|
||||||
|
!endif
|
||||||
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
|
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
|
||||||
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
||||||
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
||||||
|
|
|
@ -131,8 +131,13 @@
|
||||||
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
|
||||||
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
|
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.inf
|
||||||
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf
|
||||||
|
!if $(PCIE_BASE) == 0
|
||||||
|
PciLib|MdePkg/Library/BasePciLibCf8/BasePciLibCf8.inf
|
||||||
|
PciCf8Lib|MdePkg/Library/BasePciCf8Lib/BasePciCf8Lib.inf
|
||||||
|
!else
|
||||||
PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
|
PciLib|MdePkg/Library/BasePciLibPciExpress/BasePciLibPciExpress.inf
|
||||||
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
|
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
|
||||||
|
!endif
|
||||||
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
|
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
|
||||||
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
|
||||||
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
|
||||||
|
|
Loading…
Reference in New Issue