]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Feature/VTd/IntelVTdDxe/PciInfo.c
IntelSiliconPkg IntelVTdDxe: Optimize when func 0 is not implemented
[mirror_edk2.git] / IntelSiliconPkg / Feature / VTd / IntelVTdDxe / PciInfo.c
index 36750b3f1d9cee413c996c681b51ce011aa50252..305995de032c17e798e1991cbca9df9ccbf8a973 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -247,6 +247,12 @@ ScanPciBus (
       VendorID  = PciSegmentRead16 (PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, PCI_VENDOR_ID_OFFSET));\r
       DeviceID  = PciSegmentRead16 (PCI_SEGMENT_LIB_ADDRESS(Segment, Bus, Device, Function, PCI_DEVICE_ID_OFFSET));\r
       if (VendorID == 0xFFFF && DeviceID == 0xFFFF) {\r
+        if (Function == 0) {\r
+          //\r
+          // If function 0 is not implemented, do not scan other functions.\r
+          //\r
+          break;\r
+        }\r
         continue;\r
       }\r
 \r