From deac23ab9678722c84c4ea0f70ff2bbbf04ff3aa Mon Sep 17 00:00:00 2001 From: "Leahy, Leroy P" Date: Mon, 9 May 2016 10:57:35 -0700 Subject: 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 Reviewed-by: Prince Agyeman --- CorebootModulePkg/PciBusNoEnumerationDxe/PciEnumeratorSupport.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'CorebootModulePkg') 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 @@ -226,6 +226,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 // -- cgit v1.2.3