summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1995-02-27 17:22:09 +0000
committerse <se@FreeBSD.org>1995-02-27 17:22:09 +0000
commit45a93efd7d55d1a637b4d4d0cc8f7a0a19225abf (patch)
tree866d55dfc6c1b1d92734b69ce16ed86c6049e389 /sys/pci
parent212beb9281fd3bebfbacece67288c76fec3de5b4 (diff)
downloadFreeBSD-src-45a93efd7d55d1a637b4d4d0cc8f7a0a19225abf.zip
FreeBSD-src-45a93efd7d55d1a637b4d4d0cc8f7a0a19225abf.tar.gz
Add code to deal with PCI-PCI bridge chips, especially the DEC 21050.
Try to deduce maximum number of PCI buses in system (working around chip set bugs). Better check for devices at multiple addresses (aliases). Reviewed by: se Submitted by: <wolf@kintaro.cologne.de> Wolfgang Stanglmeier
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/pcisupport.c47
1 files changed, 43 insertions, 4 deletions
diff --git a/sys/pci/pcisupport.c b/sys/pci/pcisupport.c
index 5fab484..ae53d85 100644
--- a/sys/pci/pcisupport.c
+++ b/sys/pci/pcisupport.c
@@ -1,6 +1,6 @@
/**************************************************************************
**
-** $Id: pcisupport.c,v 1.8 1995/02/02 13:12:18 davidg Exp $
+** $Id: pcisupport.c,v 1.9 1995/02/14 03:19:27 wollman Exp $
**
** Device driver for INTEL PCI chipsets.
**
@@ -41,6 +41,7 @@
***************************************************************************
*/
+#define __PCISUPPORT_C_PATCHLEVEL__ "pl2 95/02/27"
/*==========================================================
**
@@ -289,6 +290,44 @@ void chipset_attach(pcici_t config_id, int unit)
/*---------------------------------------------------------
**
+** Catchall driver for pci-pci bridges.
+**
+**---------------------------------------------------------
+*/
+
+static char* ppb_probe (pcici_t tag, pcidi_t type);
+static void ppb_attach(pcici_t tag, int unit);
+static u_long ppb_count;
+
+struct pci_device ppb_device = {
+ "ppb",
+ ppb_probe,
+ ppb_attach,
+ &ppb_count
+};
+
+DATA_SET (pcidevice_set, ppb_device);
+
+static char* ppb_probe (pcici_t tag, pcidi_t type)
+{
+ int data = pci_conf_read(tag, PCI_CLASS_REG);
+
+ if ((data & (PCI_CLASS_MASK|PCI_SUBCLASS_MASK)) ==
+ (PCI_CLASS_BRIDGE|PCI_SUBCLASS_BRIDGE_PCI))
+ return ("PCI-PCI bridge");
+ return ((char*)0);
+}
+
+static void ppb_attach(pcici_t tag, int unit)
+{
+ /*
+ ** XXX should read bus number from device
+ */
+ (void) pci_map_bus (tag, 1);
+}
+
+/*---------------------------------------------------------
+**
** Catchall driver for VGA devices
**
**
@@ -335,10 +374,10 @@ static char* vga_probe (pcici_t tag, pcidi_t type)
static void vga_attach(pcici_t tag, int unit)
{
/*
-** Breaks some systems.
-** The assigned adresses _have_ to be announced to the console driver.
+** The assigned adresses may not be remapped,
+** because certain values are assumed by the console driver.
*/
-#if 0
+#ifndef PCI_REMAP
vm_offset_t va;
vm_offset_t pa;
int reg;
OpenPOWER on IntegriCloud