Attach isa, eisa, and pci to mainbus now, rather than root. The i386
now has a single device tree (rather than a forest). Also, attach EISA only if it's present, and attach in order: PCI, EISA, ISA (most specific to least specific).
This commit is contained in:
parent
c5f7cf3a9e
commit
fedca4f133
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: BOAT_ANCHOR,v 1.53 1996/02/28 02:02:29 cgd Exp $
|
||||
# $NetBSD: BOAT_ANCHOR,v 1.54 1996/03/04 03:25:48 cgd Exp $
|
||||
#
|
||||
# BOAT_ANCHOR -- kernel for the 386-20 the gang uses for testing
|
||||
#
|
||||
|
@ -75,9 +75,11 @@ options PCVT_24LINESDEF
|
|||
config netbsd root on wd0 swap on wd0
|
||||
#options GENERIC
|
||||
|
||||
isa0 at root
|
||||
#eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
#eisa0 at mainbus0
|
||||
#pci0 at mainbus0 bus ?
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: DISKLESS,v 1.15 1996/02/28 02:02:30 cgd Exp $
|
||||
# $NetBSD: DISKLESS,v 1.16 1996/03/04 03:25:51 cgd Exp $
|
||||
#
|
||||
# DISKLESS -- Generic machine setup for diskless boot.
|
||||
# This kernel can be loaded from a bootable floppy (i.e. kernel-copy)
|
||||
|
@ -73,9 +73,11 @@ options CCITT,LLC,HDLC # X.25
|
|||
config netbsd root on nfs swap on nfs
|
||||
#options GENERIC
|
||||
|
||||
isa0 at root
|
||||
#eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
#eisa0 at mainbus0
|
||||
#pci0 at mainbus0 bus ?
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.30 1996/02/28 02:02:32 cgd Exp $
|
||||
# $NetBSD: GENERIC,v 1.31 1996/03/04 03:25:52 cgd Exp $
|
||||
#
|
||||
# GENERIC -- everything that's currently supported
|
||||
#
|
||||
|
@ -76,9 +76,11 @@ options CCITT,LLC,HDLC # X.25
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0 bus ?
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERICADP,v 1.7 1996/02/28 02:02:33 cgd Exp $
|
||||
# $NetBSD: GENERICADP,v 1.8 1996/03/04 03:25:54 cgd Exp $
|
||||
#
|
||||
# GENERICADP -- everything that's currently supported, except non-
|
||||
# Adaptec SCSI controllers.
|
||||
|
@ -77,9 +77,11 @@ options CCITT,LLC,HDLC # X.25
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0 bus ?
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERICOTHER,v 1.6 1996/02/28 02:02:34 cgd Exp $
|
||||
# $NetBSD: GENERICOTHER,v 1.7 1996/03/04 03:25:55 cgd Exp $
|
||||
#
|
||||
# GENERICOTHER -- everything that's currently supported, except
|
||||
# Adaptec SCSI controllers.
|
||||
|
@ -77,9 +77,11 @@ options CCITT,LLC,HDLC # X.25
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: INSTADP,v 1.6 1996/02/28 02:02:36 cgd Exp $
|
||||
# $NetBSD: INSTADP,v 1.7 1996/03/04 03:25:57 cgd Exp $
|
||||
#
|
||||
# INSTADP -- like GENERICADP. This supports only Adaptec SCSI
|
||||
# adapters. This kernel is GENERICADP with lines
|
||||
|
@ -48,9 +48,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: INSTALL,v 1.5 1996/02/28 02:02:37 cgd Exp $
|
||||
# $NetBSD: INSTALL,v 1.6 1996/03/04 03:25:59 cgd Exp $
|
||||
#
|
||||
# INSTOTHER -- like GENERICOTHER. This supports only non-Adaptec SCSI
|
||||
# adapters. This kernel is GENERICOTHER with lines
|
||||
|
@ -48,9 +48,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: INSTOTHER,v 1.5 1996/02/28 02:02:37 cgd Exp $
|
||||
# $NetBSD: INSTOTHER,v 1.6 1996/03/04 03:25:59 cgd Exp $
|
||||
#
|
||||
# INSTOTHER -- like GENERICOTHER. This supports only non-Adaptec SCSI
|
||||
# adapters. This kernel is GENERICOTHER with lines
|
||||
|
@ -48,9 +48,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
pci0 at mainbus0
|
||||
|
||||
ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: JUNK,v 1.3 1995/03/02 09:11:33 glass Exp $
|
||||
# $NetBSD: JUNK,v 1.4 1996/03/04 03:26:00 cgd Exp $
|
||||
#
|
||||
# JUNK -- Adam's Compaq SLT 386/20
|
||||
#
|
||||
|
@ -45,7 +45,9 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd root on wd0 swap on wd0
|
||||
options JUNK
|
||||
|
||||
isa0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
|
||||
npx0 at isa? port 0xf0 irq 13 # math coprocessor
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: KICKME,v 1.27 1995/08/22 19:43:19 jtc Exp $
|
||||
# $NetBSD: KICKME,v 1.28 1996/03/04 03:26:01 cgd Exp $
|
||||
#
|
||||
# KICKME -- 486Cx-33 development machine
|
||||
#
|
||||
|
@ -44,7 +44,9 @@ options INET # IP + ICMP + TCP + UDP
|
|||
|
||||
config netbsd root on sd0 swap on sd0 and sd1
|
||||
|
||||
isa0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
|
||||
npx0 at isa? port 0xf0 irq 13 # math coprocessor
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: PAIN,v 1.57 1996/02/28 02:02:38 cgd Exp $
|
||||
# $NetBSD: PAIN,v 1.58 1996/03/04 03:26:03 cgd Exp $
|
||||
#
|
||||
# PAIN -- mail server and test machine
|
||||
#
|
||||
|
@ -72,9 +72,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
#pci0 at mainbus0
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: PATEK,v 1.28 1996/02/28 02:02:40 cgd Exp $
|
||||
# $NetBSD: PATEK,v 1.29 1996/03/04 03:26:04 cgd Exp $
|
||||
#
|
||||
# PATEK -- Mycroft's 486 test box
|
||||
#
|
||||
|
@ -71,9 +71,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd swap generic
|
||||
options GENERIC
|
||||
|
||||
isa0 at root
|
||||
#eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
#eisa0 at mainbus0
|
||||
#pci0 at mainbus0
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: SUN_LAMP,v 1.63 1996/02/28 02:02:41 cgd Exp $
|
||||
# $NetBSD: SUN_LAMP,v 1.64 1996/03/04 03:26:05 cgd Exp $
|
||||
#
|
||||
# SUN_LAMP -- kernel for one of cgd's 486/50 EISA boxes...
|
||||
#
|
||||
|
@ -71,9 +71,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd root on sd0 swap on sd0 and sd1 and sd2
|
||||
#options GENERIC
|
||||
|
||||
isa0 at root
|
||||
eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
eisa0 at mainbus0
|
||||
#pci0 at mainbus0 bus ?
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: TDR,v 1.56 1996/02/28 02:02:43 cgd Exp $
|
||||
# $NetBSD: TDR,v 1.57 1996/03/04 03:26:07 cgd Exp $
|
||||
#
|
||||
# TDR -- Theo Deraadt's 486
|
||||
#
|
||||
|
@ -71,9 +71,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd root on sd0 swap on sd0 and sd1 and wd0
|
||||
#options GENERIC
|
||||
|
||||
isa0 at root
|
||||
#eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
#eisa0 at mainbus0
|
||||
#pci0 at mainbus0
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: TRINITY,v 1.61 1996/02/28 02:02:44 cgd Exp $
|
||||
# $NetBSD: TRINITY,v 1.62 1996/03/04 03:26:09 cgd Exp $
|
||||
#
|
||||
# TRINITY -- Mycroft's 386 box
|
||||
#
|
||||
|
@ -73,9 +73,11 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd root on sd0 swap on sd0 and sd1 and sd2 and sd3 and wd0 and wd1
|
||||
#options GENERIC
|
||||
|
||||
isa0 at root
|
||||
#eisa0 at root
|
||||
#pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
#eisa0 at mainbus0
|
||||
#pci0 at mainbus0
|
||||
|
||||
#ppb* at pci? dev ? function ? # PCI-PCI bridges
|
||||
#pci* at ppb? bus ?
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: WARPED,v 1.2 1996/02/28 02:02:46 cgd Exp $
|
||||
# $Id: WARPED,v 1.3 1996/03/04 03:26:10 cgd Exp $
|
||||
#
|
||||
# WARPED - ftp/sup.netbsd.org server machine
|
||||
#
|
||||
|
@ -38,8 +38,10 @@ options INET # IP + ICMP + TCP + UDP
|
|||
config netbsd root on sd0a swap on sd0b and sd1b
|
||||
options NMBCLUSTERS=2048
|
||||
|
||||
isa0 at root
|
||||
pci0 at root
|
||||
mainbus0 at root
|
||||
|
||||
isa0 at mainbus0
|
||||
pci0 at mainbus0
|
||||
|
||||
npx0 at isa? port 0xf0 irq 13 # math coprocessor
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: files.i386,v 1.64 1996/02/28 01:58:25 cgd Exp $
|
||||
# $NetBSD: files.i386,v 1.65 1996/03/04 03:26:11 cgd Exp $
|
||||
#
|
||||
# new style config file for i386 architecture
|
||||
#
|
||||
|
@ -44,6 +44,9 @@ major {cd = 6}
|
|||
# System bus types
|
||||
#
|
||||
|
||||
device mainbus at root: isabus, eisabus, pcibus
|
||||
file arch/i386/i386/mainbus.c mainbus
|
||||
|
||||
#device mca at root {...}
|
||||
|
||||
#
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/* $NetBSD: eisa_machdep.h,v 1.1 1996/03/04 03:26:14 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Christopher G. Demetriou
|
||||
* for the NetBSD Project.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The "EISA" signature is in the BIOS of EISA systems. We use it
|
||||
* to determine whether or not we have an EISA bus.
|
||||
*/
|
||||
#define EISA_ID "EISA"
|
||||
#define EISA_ID_LEN (sizeof(EISA_ID) - 1)
|
||||
#define EISA_ID_PADDR 0xfffd9
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.17 1996/02/28 01:54:44 cgd Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.18 1996/03/04 03:26:18 cgd Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -58,14 +58,6 @@
|
|||
|
||||
#include <machine/pte.h>
|
||||
|
||||
#if 0 /* XXX eisavar.h includes isavar.h, which is not idempotent */
|
||||
#include <dev/isa/isavar.h>
|
||||
#endif
|
||||
#include <dev/eisa/eisavar.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#include "pci.h"
|
||||
|
||||
/*
|
||||
* The following several variables are related to
|
||||
* the configuration process, and are used in initializing
|
||||
|
@ -78,38 +70,11 @@ extern int cold; /* cold start flag initialized in locore.s */
|
|||
*/
|
||||
configure()
|
||||
{
|
||||
struct isabus_attach_args iba;
|
||||
struct eisabus_attach_args eba;
|
||||
#if NPCI > 0
|
||||
struct pcibus_attach_args pba;
|
||||
#endif
|
||||
|
||||
startrtclock();
|
||||
|
||||
/*
|
||||
* XXX These should only 'find' busses if they are actually
|
||||
* XXX present. However, there's currently no way to check
|
||||
* XXX whether or not isa and eisa are present. Until there
|
||||
* XXX is, the old way of always configuring them will have to
|
||||
* XXX do. Note also that the presence of a PCI bus should
|
||||
* XXX _always_ be checked, and if present the bus should be
|
||||
* XXX 'found'. However, because of the structure of the code,
|
||||
* XXX that's not currently possible.
|
||||
*/
|
||||
iba.iba_busname = "isa";
|
||||
config_rootfound("isa", &iba);
|
||||
|
||||
eba.eba_busname = "eisa";
|
||||
config_rootfound("eisa", &eba);
|
||||
|
||||
#if NPCI > 0
|
||||
if (pci_mode_detect() != 0) {
|
||||
pba.pba_busname = "pci";
|
||||
pba.pba_bus = 0;
|
||||
pba.pba_maxndevs = pci_mode == 2 ? 16 : 32;
|
||||
config_rootfound("pci", &pba);
|
||||
}
|
||||
#endif
|
||||
if (config_rootfound("mainbus", NULL) == NULL)
|
||||
panic("configure: mainbus not configured");
|
||||
|
||||
printf("biomask %x netmask %x ttymask %x\n",
|
||||
(u_short)imask[IPL_BIO], (u_short)imask[IPL_NET],
|
||||
|
|
|
@ -0,0 +1,139 @@
|
|||
/* $NetBSD: mainbus.c,v 1.1 1996/03/04 03:26:19 cgd Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by Christopher G. Demetriou
|
||||
* for the NetBSD Project.
|
||||
* 4. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/device.h>
|
||||
|
||||
#ifdef notyet
|
||||
#include <machine/bus.h>
|
||||
#endif
|
||||
|
||||
#if 0 /* XXX eisavar.h includes isavar.h, which is not idempotent */
|
||||
#include <dev/isa/isavar.h>
|
||||
#endif
|
||||
#include <dev/eisa/eisavar.h>
|
||||
#include <dev/pci/pcivar.h>
|
||||
|
||||
#include <dev/isa/isareg.h>
|
||||
#include <i386/isa/isa_machdep.h>
|
||||
#include <i386/eisa/eisa_machdep.h>
|
||||
|
||||
#include "pci.h"
|
||||
|
||||
int mainbus_match __P((struct device *, void *, void *));
|
||||
void mainbus_attach __P((struct device *, struct device *, void *));
|
||||
|
||||
struct cfdriver mainbuscd =
|
||||
{ NULL, "mainbus", mainbus_match, mainbus_attach,
|
||||
DV_DULL, sizeof(struct device) };
|
||||
|
||||
int mainbus_print __P((void *, char *));
|
||||
|
||||
/*
|
||||
* Probe for the mainbus; always succeeds.
|
||||
*/
|
||||
int
|
||||
mainbus_match(parent, match, aux)
|
||||
struct device *parent;
|
||||
void *match, *aux;
|
||||
{
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Attach the mainbus.
|
||||
*/
|
||||
void
|
||||
mainbus_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
{
|
||||
|
||||
printf("\n");
|
||||
|
||||
/*
|
||||
* XXX Note also that the presence of a PCI bus should
|
||||
* XXX _always_ be checked, and if present the bus should be
|
||||
* XXX 'found'. However, because of the structure of the code,
|
||||
* XXX that's not currently possible.
|
||||
*/
|
||||
#if NPCI > 0
|
||||
if (pci_mode_detect() != 0) {
|
||||
struct pcibus_attach_args pba;
|
||||
|
||||
pba.pba_busname = "pci";
|
||||
#ifdef notyet
|
||||
pba.pba_bc = NULL;
|
||||
#endif
|
||||
pba.pba_bus = 0;
|
||||
pba.pba_maxndevs = pci_mode == 2 ? 16 : 32;
|
||||
config_found(self, &pba, mainbus_print);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!bcmp(ISA_HOLE_VADDR(EISA_ID_PADDR), EISA_ID, EISA_ID_LEN)) {
|
||||
struct eisabus_attach_args eba;
|
||||
|
||||
eba.eba_busname = "eisa";
|
||||
#ifdef notyet
|
||||
eba.eba_bc = NULL;
|
||||
#endif
|
||||
config_found(self, &eba, mainbus_print);
|
||||
}
|
||||
|
||||
if (1 /* XXX ISA NOT YET SEEN */) {
|
||||
struct isabus_attach_args iba;
|
||||
|
||||
iba.iba_busname = "isa";
|
||||
#ifdef notyet
|
||||
iba.iba_bc = NULL;
|
||||
#endif
|
||||
config_found(self, &iba, mainbus_print);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
mainbus_print(aux, pnp)
|
||||
void *aux;
|
||||
char *pnp;
|
||||
{
|
||||
char **busname = aux; /* XXX should be common struct */
|
||||
struct pcibus_attach_args *pba = aux;
|
||||
|
||||
if (pnp)
|
||||
printf("%s at %s", *busname, pba);
|
||||
if (!strcmp(*busname, "pci"))
|
||||
printf(" bus %d", pba->pba_bus);
|
||||
return (UNCONF);
|
||||
}
|
Loading…
Reference in New Issue