From d50c7b65af699615c4fdce907899e59fd6349245 Mon Sep 17 00:00:00 2001 From: se Date: Tue, 12 Nov 1996 23:18:12 +0000 Subject: Add support for header type == 1 devices (PCI 2.1 compatible PCI to PCI bridges with support for 64 bit memory addresses and 32 bit I/O addresses). The code is not complete. It ignores the upper half of the long addresses. This is not a problem on PC compatible systems, but has to be fixed for real computers. --- sys/pci/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/pci/pci.c') diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 2913c5b..054bdaa 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.57 1996/10/22 20:20:11 se Exp $ +** $Id: pci.c,v 1.58 1996/11/12 23:10:17 se Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -1743,9 +1743,14 @@ pci_remember(int bus, int dev, int func) p->pc_sel.pc_bus = bus; p->pc_sel.pc_dev = dev; p->pc_sel.pc_func = func; + p->pc_hdr = (pci_conf_read (tag, PCI_HEADER_MISC) >> 16) & 0xff; tag = pcibus->pb_tag (bus, dev, func); p->pc_devid = pci_conf_read(tag, PCI_ID_REG); - p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG); + if ((p->pc_hdr & 0x7f) == 1) { + p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG1); + } else { + p->pc_subid = pci_conf_read(tag, PCI_SUBID_REG0); + } p->pc_class = pci_conf_read(tag, PCI_CLASS_REG); } -- cgit v1.1