diff --git a/sys/arch/i386/i386/mainbus.c b/sys/arch/i386/i386/mainbus.c index 15f3781838a9..2f232085a458 100644 --- a/sys/arch/i386/i386/mainbus.c +++ b/sys/arch/i386/i386/mainbus.c @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.15 1996/11/22 00:19:08 jtk Exp $ */ +/* $NetBSD: mainbus.c,v 1.16 1996/11/28 02:43:58 thorpej Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. @@ -73,6 +73,12 @@ union mainbus_attach_args { #endif }; +/* + * This is set when the ISA bus is attached. If it's not set by the + * time it's checked below, then mainbus attempts to attach an ISA. + */ +int isa_has_been_seen; + /* * Probe for the mainbus; always succeeds. */ @@ -120,7 +126,7 @@ mainbus_attach(parent, self, aux) config_found(self, &mba.mba_eba, mainbus_print); } - if (1 /* XXX ISA NOT YET SEEN */) { + if (isa_has_been_seen == 0) { mba.mba_iba.iba_busname = "isa"; mba.mba_iba.iba_iot = I386_BUS_SPACE_IO; mba.mba_iba.iba_memt = I386_BUS_SPACE_MEM; diff --git a/sys/arch/i386/isa/isa_machdep.c b/sys/arch/i386/isa/isa_machdep.c index 78c1e38cd47c..aae612fde872 100644 --- a/sys/arch/i386/isa/isa_machdep.c +++ b/sys/arch/i386/isa/isa_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: isa_machdep.c,v 1.16 1996/11/20 14:09:07 mycroft Exp $ */ +/* $NetBSD: isa_machdep.c,v 1.17 1996/11/28 02:43:53 thorpej Exp $ */ /*- * Copyright (c) 1993, 1994, 1996 Charles M. Hannum. All rights reserved. @@ -333,6 +333,13 @@ isa_attach_hook(parent, self, iba) struct device *parent, *self; struct isabus_attach_args *iba; { + extern int isa_has_been_seen; - /* Nothing to do. */ + /* + * Notify others that might need to know that the ISA bus + * has now been attached. + */ + if (isa_has_been_seen) + panic("isaattach: ISA bus already seen!"); + isa_has_been_seen = 1; }