summaryrefslogtreecommitdiffstats
path: root/CorebootModulePkg
diff options
context:
space:
mode:
authorLeahy, Leroy P <leroy.p.leahy@intel.com>2016-05-09 10:57:35 -0700
committerPrince Agyeman <prince.agyeman@intel.com>2016-05-10 10:12:56 -0700
commitdeac23ab9678722c84c4ea0f70ff2bbbf04ff3aa (patch)
treeb0125ae0b0968d6228ea806bfcaf46c533335c5a /CorebootModulePkg
parenta4fdb495dbf4bd6d741f9deb7db29986551ca8ea (diff)
downloadedk2-deac23ab9678722c84c4ea0f70ff2bbbf04ff3aa.tar.gz
edk2-deac23ab9678722c84c4ea0f70ff2bbbf04ff3aa.tar.bz2
edk2-deac23ab9678722c84c4ea0f70ff2bbbf04ff3aa.zip
CorebootPayloadPkg/PciBusNoEnumerationDxe: Skip disabled devices
Skip non-bridge devices which are not enabled either for memory or I/O access. Change-Id: I1a39c69a8556b6b9cefd1a2bb191f7e0744ddfb0 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com> Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
Diffstat (limited to 'CorebootModulePkg')
-rw-r--r--CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c b/CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
index 0b0247dffc..58b9385a37 100644
--- a/CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
+++ b/CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c
@@ -227,6 +227,15 @@ Returns:
if (!EFI_ERROR (Status)) {
//
+ // Skip non-bridge devices which are not enabled
+ //
+ if (((Pci.Hdr.Command & (EFI_PCI_COMMAND_IO_SPACE
+ | EFI_PCI_COMMAND_MEMORY_SPACE)) == 0)
+ && (!(IS_PCI_BRIDGE (&Pci) || IS_CARDBUS_BRIDGE (&Pci)))) {
+ continue;
+ }
+
+ //
// Collect all the information about the PCI device discovered
//
Status = PciSearchDevice (