]> xenbits.xensource.com Git - people/liuw/ovmf.git/commitdiff
MdeModulePkg: introduce PcdPciAllowFullEnumeration
authorWei Liu <wei.liu2@citrix.com>
Tue, 19 Nov 2013 18:49:32 +0000 (18:49 +0000)
committerWei Liu <wei.liu2@citrix.com>
Tue, 19 Nov 2013 20:10:28 +0000 (20:10 +0000)
Platforms such as Xen already enumerates PCI bridges and devices. Use
this PCD to control EDK2 behavior.

The default behavior is to allow full PCI enumeration. This is the same
behavior as before this change.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Laszlo Ersek <lersek@redhat.com>
MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c
MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
MdeModulePkg/MdeModulePkg.dec

index 5afbb82298e90e7a952e2a41a46d9067acc36cb9..49c204c9de9f2b2d57535381eeaff0597a856e07 100644 (file)
@@ -284,7 +284,10 @@ PciBusDriverBindingStart (
           );\r
   }  \r
 \r
-  gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));\r
+  if (PcdGetBool (PcdPciAllowFullEnumeration))\r
+    gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE));\r
+  else\r
+    gFullEnumeration = FALSE;\r
 \r
   //\r
   // Open Device Path Protocol for PCI root bridge\r
index 34eb672df1dac578d31b66ebc8741e554d83240c..626ae995a5f5c00478add41b6c54b11b12c0b64a 100644 (file)
   gEfiMdeModulePkgTokenSpaceGuid.PcdSrIovSupport\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdAriSupport\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciAllowFullEnumeration\r
 \r
 # [Event]\r
 #   ##\r
index b627eb101c2851396a8a36fa873772c4d930b904..274d2e58193ab963dc1df0f022d7cf1ca093b0c1 100644 (file)
   ## This PCD specifies whether the Multi Root I/O virtualization support.\r
   gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport|FALSE|BOOLEAN|0x10000046\r
 \r
+  ## This PCD specifies whether full PCI enumeration is allowed.\r
+  gEfiMdeModulePkgTokenSpaceGuid.PcdPciAllowFullEnumeration|TRUE|BOOLEAN|0x10000048\r
+\r
 [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]\r
   ## Single root I/O virtualization virtual function memory BAR alignment\r
   #  BITN set indicates 2 of n+12 power\r