Jordan Justen
2013-Nov-24 22:05 UTC
Re: [edk2] [PATCH RFC v2 1/7] MdeModulePkg: introduce PcdPciAllowFullEnumeration
Feng, what do you think of this change to MdeModulePkg? Wei, How about PcdPciDisableBusEnumeration instead? -Jordan On Tue, Nov 19, 2013 at 12:38 PM, Wei Liu <wei.liu2@citrix.com> wrote:> 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 | 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..49c204c 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 (PcdPciAllowFullEnumeration)) > + gFullEnumeration = (BOOLEAN) ((SearchHostBridgeHandle (Controller) ? FALSE : TRUE)); > + else > + gFullEnumeration = FALSE; > > // > // 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..626ae99 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.PcdPciAllowFullEnumeration > > # [Event] > # ## > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec > index b627eb1..274d2e5 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 allowed. > + gEfiMdeModulePkgTokenSpaceGuid.PcdPciAllowFullEnumeration|TRUE|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 > > > ------------------------------------------------------------------------------ > Shape the Mobile Experience: Free Subscription > Software experts and developers: Be at the forefront of tech innovation. > Intel(R) Software Adrenaline delivers strategic insight and game-changing > conversations that shape the rapidly evolving mobile landscape. Sign up now. > http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/edk2-devel