summaryrefslogtreecommitdiff
path: root/edk2/PcAtChipsetPkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-02 23:20:11 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-02 23:20:11 +0000
commit1613244815e2d87f531746d005aa23b07b6c7543 (patch)
tree793ec0781e202c3f4a00c5c6803c49ebac9004d8 /edk2/PcAtChipsetPkg
parent202ea51936ee765aec78a89829cf93fecb9739da (diff)
Update logic in Suuported() for PCI-ISA Bridges with Positive Decode to avoid false positives on bridges of class PCI_CLASS_BRIDGE_OTHER.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk@10626 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/PcAtChipsetPkg')
-rw-r--r--edk2/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c27
1 files changed, 23 insertions, 4 deletions
diff --git a/edk2/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c b/edk2/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
index e8789e5d1..468f19395 100644
--- a/edk2/PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
+++ b/edk2/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;
+ }
}
}
}