summaryrefslogtreecommitdiffstats
path: root/CorebootPayloadPkg
diff options
context:
space:
mode:
authorMaurice Ma <maurice.ma@intel.com>2016-11-16 19:01:01 -0800
committerMaurice Ma <maurice.ma@intel.com>2016-11-17 10:21:52 -0800
commit28b3a713b66998a8be3e8558eb85f18699e15b2e (patch)
tree60bc878f696af58b37ef6d65c80738384d72d87c /CorebootPayloadPkg
parent5ea2bad0d9ab6a2465195badd323313553baa61b (diff)
downloadedk2-28b3a713b66998a8be3e8558eb85f18699e15b2e.tar.gz
edk2-28b3a713b66998a8be3e8558eb85f18699e15b2e.tar.bz2
edk2-28b3a713b66998a8be3e8558eb85f18699e15b2e.zip
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>
Diffstat (limited to 'CorebootPayloadPkg')
-rw-r--r--CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc5
-rw-r--r--CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc5
2 files changed, 10 insertions, 0 deletions
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
index d4b3f71157..cdfcb75b59 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32.dsc
@@ -129,8 +129,13 @@
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.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
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+!endif
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
diff --git a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
index 1e9bae9fb1..c35f261d67 100644
--- a/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
+++ b/CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
@@ -131,8 +131,13 @@
PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf
CpuLib|MdePkg/Library/BaseCpuLib/BaseCpuLib.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
PciExpressLib|MdePkg/Library/BasePciExpressLib/BasePciExpressLib.inf
+!endif
PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf