Enable interrupts AFTER autoconfiguration, to avoid spurrious ones.

This commit is contained in:
gwr 1997-01-18 19:32:37 +00:00
parent 94b20c709d
commit 324e1c6027
2 changed files with 8 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.38 1996/12/17 21:11:14 gwr Exp $ */
/* $NetBSD: autoconf.c,v 1.39 1997/01/18 19:32:37 gwr Exp $ */
/*-
* Copyright (c) 1996 The NetBSD Foundation, Inc.
@ -69,13 +69,14 @@ int cold;
void configure()
{
struct device *mainbus;
/* General device autoconfiguration. */
mainbus = config_rootfound("mainbus", NULL);
if (mainbus == NULL)
if (config_rootfound("mainbus", NULL) == NULL)
panic("configure: mainbus not found");
printf("enabling interrupts\n");
(void)spl0();
/* Choose root and swap devices. */
swapgeneric();
swapconf();

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.41 1996/12/17 21:11:31 gwr Exp $ */
/* $NetBSD: locore.s,v 1.42 1997/01/18 19:32:38 gwr Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@ -123,7 +123,8 @@ L_high_code:
| Note curpcb was already set in sun3_bootstrap.
| Will do fpu initialization during autoconfig (see fpu.c)
| The interrupt vector table and stack are now ready.
movw #PSL_LOWIPL,sr | lower SPL
| Interrupts will be enabled later, AFTER autoconfiguration
| is finished, to avoid spurrious interrupts.
/*
* Final preparation for calling main.