summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Bus/Pci
diff options
context:
space:
mode:
authorWei Liu <wei.liu2@citrix.com>2013-12-08 01:35:32 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-12-08 01:35:32 +0000
commit5624a27ddebc154ac467b86225a2cab913567dc7 (patch)
tree5e5e0d1bb91174fa77710f2ee4ea523e34497b3d /MdeModulePkg/Bus/Pci
parent7cf1a5b328655f59ceca3ecc487baffdd116f571 (diff)
downloadedk2-platforms-5624a27ddebc154ac467b86225a2cab913567dc7.tar.xz
MdeModulePkg: introduce PcdPciDisableBusEnumeration
Platforms such as Xen already enumerates PCI bridges and devices. Use this PCD to control EDK2 behavior. PcdPciDisableBusEnumeration is placed under [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx], so that it is possible to alter it during runtime. The default setting of this PCD is false (allow full PCI enumeration) to preserve the same behavior before this change. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wei Liu <wei.liu2@citrix.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Michael Kinney <michael.d.kinney@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14940 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Bus/Pci')
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c6
-rw-r--r--MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf1
2 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
index 5afbb82298..2252235bce 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
@@ -284,7 +284,11 @@ PciBusDriverBindingStart (
);
}
- gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));
+ if (PcdGetBool (PcdPciDisableBusEnumeration)) {
+ gFullEnumeration = FALSE;
+ } else {
+ gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));
+ }
//
// Open Device Path Protocol for PCI root bridge
diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
index 34eb672df1..917889ca0a 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
@@ -108,6 +108,7 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport
gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport
+ gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration
# [Event]
# ##