summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1996-11-12 23:18:12 +0000
committerse <se@FreeBSD.org>1996-11-12 23:18:12 +0000
commitd50c7b65af699615c4fdce907899e59fd6349245 (patch)
treea5ecf7f41715b671c496249a97a021543426a40e /sys/pci/pci.c
parentbb3b58af857086afe079fca68139fd585381bfff (diff)
downloadFreeBSD-src-d50c7b65af699615c4fdce907899e59fd6349245.zip
FreeBSD-src-d50c7b65af699615c4fdce907899e59fd6349245.tar.gz
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.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r--sys/pci/pci.c9
1 files changed, 7 insertions, 2 deletions
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);
}
OpenPOWER on IntegriCloud