fix slight bogons in splhigh() usage, that were introduced when the

behaviour of splhigh() was changed.  The new behaviour raised the level to
IPL_HIGH if it was lower, but left it alone if the same or higher.  Apparently
the firmware transfers to NetBSD with all interrupts blocked, or something
else blocks all interrupts (including machine checks) before the code
is really started.  This meant that machine checks were blocked during
device probes, leading to false device probes _and_ an unexpected (and
therefore fatal) machine check at the spl0() after autoconfiguration.
This commit is contained in:
cgd 1997-06-06 19:52:42 +00:00
parent ca0d389297
commit 2a9a4b6fde
2 changed files with 13 additions and 7 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: autoconf.c,v 1.24 1997/04/07 23:39:37 cgd Exp $ */
/* $NetBSD: autoconf.c,v 1.25 1997/06/06 19:52:42 cgd Exp $ */
/*
* Copyright (c) 1992, 1993
@ -47,7 +47,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.24 1997/04/07 23:39:37 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.25 1997/06/06 19:52:42 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -89,7 +89,13 @@ configure()
parse_prom_bootdev();
(void)splhigh();
/*
* Disable interrupts during autoconfiguration. splhigh() won't
* work, because it simply _raises_ the IPL, so if machine checks
* are disabled, they'll stay disabled. Machine checks are needed
* during autoconfig.
*/
(void)alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH);
if (config_rootfound("mainbus", "mainbus") == NULL)
panic("no mainbus found");
(void)spl0();

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.76 1997/04/11 00:07:08 cgd Exp $ */
/* $NetBSD: machdep.c,v 1.77 1997/06/06 19:52:43 cgd Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@ -30,7 +30,7 @@
#include <machine/options.h> /* Config options headers */
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.76 1997/04/11 00:07:08 cgd Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.77 1997/06/06 19:52:43 cgd Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -196,10 +196,10 @@ alpha_init(pfn, ptb)
char *p;
/*
* Turn off interrupts and floating point.
* Turn off interrupts (not mchecks) and floating point.
* Make sure the instruction and data streams are consistent.
*/
(void)splhigh();
(void)alpha_pal_swpipl(ALPHA_PSL_IPL_HIGH);
alpha_pal_wrfen(0);
ALPHA_TBIA();
alpha_pal_imb();