Reviewed-by: Ruiyu Ni <ruiyu...@intel.com>
>-----Original Message----- >From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Maurice >Ma >Sent: Tuesday, May 17, 2016 5:26 AM >To: edk2-devel@lists.01.org >Cc: Tian, Feng <feng.t...@intel.com>; Zeng, Star <star.z...@intel.com> >Subject: [edk2] [PATCH] MdeModulePkg: Skip invalid bus number scanning in >PciBusDxe driver > >When PcdPciDisableBusEnumeration is enabled, the PciBus driver >might get into a dead loop if the secondary bus register on PCI >bridge is not programmed or programmed improperly. Adding this >check to avoid any potential dead loop caused by this. > >Cc: Feng Tian <feng.t...@intel.com> >Cc: Star Zeng <star.z...@intel.com> >Contributed-under: TianoCore Contribution Agreement 1.0 >Signed-off-by: Maurice Ma <maurice...@intel.com> >--- > MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > >diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c >b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c >index a6ade26e3a09..086c481130c8 100644 >--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c >+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c >@@ -165,6 +165,14 @@ PciPciDeviceInfoCollector ( > } > > // >+ // Ensure secondary bus number is greater than the primary bus >number to avoid >+ // any potential dead loop when PcdPciDisableBusEnumeration is set >to TRUE >+ // >+ if (SecBus <= StartBusNumber) { >+ break; >+ } >+ >+ // > // Get resource padding for PPB > // > GetResourcePaddingPpb (PciIoDevice); >-- >1.9.5.msysgit.0 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel