]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: introduce PcdPciDisableBusEnumeration
authorWei Liu <wei.liu2@citrix.com>
Sun, 8 Dec 2013 01:35:32 +0000 (01:35 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sun, 8 Dec 2013 01:35:32 +0000 (01:35 +0000)
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

MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/MdeModulePkg.dec

index 5afbb82298e90e7a952e2a41a46d9067acc36cb9..2252235bceb0090f49c5b91e26e27178b81eae33 100644 (file)
@@ -284,7 +284,11 @@ PciBusDriverBindingStart (
           );\r
   }  \r
 \r
-  gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));\r
+  if (PcdGetBool (PcdPciDisableBusEnumeration)) {\r
+    gFullEnumeration = FALSE;\r
+  } else {\r
+    gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));\r
+  }\r
 \r
   //\r
   // Open Device Path Protocol for PCI root bridge\r
index 34eb672df1dac578d31b66ebc8741e554d83240c..917889ca0a92b3153b8efec5f0c5ccd880797618 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration\r
 \r
 # [Event]\r
 #   ##\r
index b627eb101c2851396a8a36fa873772c4d930b904..51984510d6e88bf37f76a4095a03cc610f3a007b 100644 (file)
   ## This PCD specified whether the S.M.A.R.T feature of attached ATA hard disks are enabled.\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable|TRUE|BOOLEAN|0x00010065\r
 \r
+  ## This PCD specifies whether full PCI enumeration is disabled.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE|BOOLEAN|0x10000048\r
+\r
 [PcdsPatchableInModule]\r
   ## Specify  memory size with page number for PEI code when \r
   #  the feature of Loading Module at Fixed Address is enabled\r