]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Update logic in Suuported() for PCI-ISA Bridges with Positive Decode to avoid false...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jul 2010 23:20:11 +0000 (23:20 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Jul 2010 23:20:11 +0000 (23:20 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10626 6f19259b-4bc3-4df7-8a09-765794883524

PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c

index e8789e5d11a4609c99ec111c9b6f062113ec99bd..468f193955b23392dfd5a860021802903ce469aa 100644 (file)
@@ -73,6 +73,10 @@ PcatIsaAcpiDriverBindingSupported (
   EFI_STATUS           Status;\r
   EFI_PCI_IO_PROTOCOL  *PciIo;\r
   PCI_TYPE00           Pci;\r
   EFI_STATUS           Status;\r
   EFI_PCI_IO_PROTOCOL  *PciIo;\r
   PCI_TYPE00           Pci;\r
+  UINTN                SegmentNumber;\r
+  UINTN                BusNumber;\r
+  UINTN                DeviceNumber;\r
+  UINTN                FunctionNumber;\r
 \r
   //\r
   // Get PciIo protocol instance\r
 \r
   //\r
   // Get PciIo protocol instance\r
@@ -110,10 +114,25 @@ PcatIsaAcpiDriverBindingSupported (
         //\r
         // See if this is an Intel PCI to ISA bridge in Positive Decode Mode\r
         //\r
         //\r
         // See if this is an Intel PCI to ISA bridge in Positive Decode Mode\r
         //\r
-        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE &&\r
-            Pci.Hdr.VendorId == 0x8086 && \r
-            (Pci.Hdr.DeviceId & 0xF000) == 0x7000) {\r
-          Status = EFI_SUCCESS;\r
+        if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && \r
+            Pci.Hdr.VendorId     == 0x8086                          ) {\r
+          //\r
+          // See if this is on Function #0 to avoid false positives on \r
+          // PCI_CLASS_BRIDGE_OTHER that has the same value as \r
+          // PCI_CLASS_BRIDGE_ISA_PDECODE\r
+          //\r
+          Status = PciIo->GetLocation (\r
+                            PciIo, \r
+                            &SegmentNumber, \r
+                            &BusNumber, \r
+                            &DeviceNumber, \r
+                            &FunctionNumber\r
+                            );\r
+          if (!EFI_ERROR (Status) && FunctionNumber == 0) {\r
+            Status = EFI_SUCCESS;\r
+          } else {\r
+            Status = EFI_UNSUPPORTED;\r
+          }\r
         }\r
       } \r
     }\r
         }\r
       } \r
     }\r