Wei, I recommend you put the declaration of the new PCD in the next section if MdeModulePkg.dec so it supports PatchableInModule as well.
Thanks, Mike -----Original Message----- From: Wei Liu [mailto:wei.l...@citrix.com] Sent: Tuesday, November 26, 2013 11:26 AM To: edk2-devel@lists.sourceforge.net; xen-de...@lists.xen.org Subject: [edk2] [PATCH v3 1/8] MdeModulePkg: introduce PcdPciDisableBusEnumeration Platforms such as Xen already enumerates PCI bridges and devices. Use this PCD to control EDK2 behavior. PcdPciDisableBusEnumeration is placed under [PcdFixedAtBuild, PcdDynamic, PcdDynamicEx], 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.l...@citrix.com> --- MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 5 ++++- MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf | 1 + MdeModulePkg/MdeModulePkg.dec | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c index 5afbb82..cc6be8b 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c @@ -284,7 +284,10 @@ 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 34eb672..917889c 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] # ## diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index b627eb1..e86868b 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -737,6 +737,9 @@ ## This PCD specifies whether the Multi Root I/O virtualization support. gEfiMdeModulePkgTokenSpaceGuid.PcdMrIovSupport|FALSE|BOOLEAN|0x10000046 + ## This PCD specifies whether full PCI enumeration is disabled. + gEfiMdeModulePkgTokenSpaceGuid.PcdPciDisableBusEnumeration|FALSE|BOOLEAN|0x10000048 + [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## Single root I/O virtualization virtual function memory BAR alignment # BITN set indicates 2 of n+12 power -- 1.7.10.4 ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ edk2-devel mailing list edk2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-devel