X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=PcAtChipsetPkg%2FIsaAcpiDxe%2FPcatIsaAcpi.c;h=468f193955b23392dfd5a860021802903ce469aa;hb=755e4d118482c3a89f429086c255e77a5c5778f9;hp=e8789e5d11a4609c99ec111c9b6f062113ec99bd;hpb=4bc6ab83ba86936df05e58465e2ab08f5ab5b01b;p=mirror_edk2.git diff --git a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c index e8789e5d11..468f193955 100644 --- a/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c +++ b/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c @@ -73,6 +73,10 @@ PcatIsaAcpiDriverBindingSupported ( EFI_STATUS Status; EFI_PCI_IO_PROTOCOL *PciIo; PCI_TYPE00 Pci; + UINTN SegmentNumber; + UINTN BusNumber; + UINTN DeviceNumber; + UINTN FunctionNumber; // // Get PciIo protocol instance @@ -110,10 +114,25 @@ PcatIsaAcpiDriverBindingSupported ( // // See if this is an Intel PCI to ISA bridge in Positive Decode Mode // - if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && - Pci.Hdr.VendorId == 0x8086 && - (Pci.Hdr.DeviceId & 0xF000) == 0x7000) { - Status = EFI_SUCCESS; + if (Pci.Hdr.ClassCode[1] == PCI_CLASS_BRIDGE_ISA_PDECODE && + Pci.Hdr.VendorId == 0x8086 ) { + // + // See if this is on Function #0 to avoid false positives on + // PCI_CLASS_BRIDGE_OTHER that has the same value as + // PCI_CLASS_BRIDGE_ISA_PDECODE + // + Status = PciIo->GetLocation ( + PciIo, + &SegmentNumber, + &BusNumber, + &DeviceNumber, + &FunctionNumber + ); + if (!EFI_ERROR (Status) && FunctionNumber == 0) { + Status = EFI_SUCCESS; + } else { + Status = EFI_UNSUPPORTED; + } } } }