Handle machine checks separate from other "stray" interrupts.
This commit is contained in:
parent
79056950e2
commit
f811a80bc3
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: autoconf.c,v 1.17 2002/05/24 21:40:59 ragge Exp $ */
|
/* $NetBSD: autoconf.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
* Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -51,7 +51,7 @@ void consinit(void);
|
||||||
void scbinit(void);
|
void scbinit(void);
|
||||||
int getsecs(void);
|
int getsecs(void);
|
||||||
void scb_stray(void *);
|
void scb_stray(void *);
|
||||||
void longjmp(int *);
|
void longjmp(int *, int);
|
||||||
void rtimer(void *);
|
void rtimer(void *);
|
||||||
|
|
||||||
long *bootregs;
|
long *bootregs;
|
||||||
|
@ -133,6 +133,17 @@ getsecs()
|
||||||
struct ivec_dsp **scb;
|
struct ivec_dsp **scb;
|
||||||
struct ivec_dsp *scb_vec;
|
struct ivec_dsp *scb_vec;
|
||||||
extern struct ivec_dsp idsptch;
|
extern struct ivec_dsp idsptch;
|
||||||
|
extern int jbuf[10];
|
||||||
|
|
||||||
|
static void
|
||||||
|
mcheck(void *arg)
|
||||||
|
{
|
||||||
|
int off, *mfp = (int *)&arg;
|
||||||
|
|
||||||
|
off = (mfp[7]/4 + 8);
|
||||||
|
printf("Machine check, pc=%x, psl=%x\n", mfp[off], mfp[off+1]);
|
||||||
|
longjmp(jbuf, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Init the SCB and set up a handler for all vectors in the lower space,
|
* Init the SCB and set up a handler for all vectors in the lower space,
|
||||||
|
@ -163,6 +174,7 @@ scbinit()
|
||||||
scb_vec[i].ev = NULL;
|
scb_vec[i].ev = NULL;
|
||||||
}
|
}
|
||||||
scb_vec[0xc0/4].hoppaddr = rtimer;
|
scb_vec[0xc0/4].hoppaddr = rtimer;
|
||||||
|
scb_vec[4/4].hoppaddr = mcheck;
|
||||||
|
|
||||||
if (vax_boardtype != VAX_BTYP_VXT)
|
if (vax_boardtype != VAX_BTYP_VXT)
|
||||||
mtpr(-10000, PR_NICR); /* Load in count register */
|
mtpr(-10000, PR_NICR); /* Load in count register */
|
||||||
|
@ -171,7 +183,6 @@ scbinit()
|
||||||
mtpr(20, PR_IPL);
|
mtpr(20, PR_IPL);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern int jbuf[10];
|
|
||||||
extern int sluttid, senast, skip;
|
extern int sluttid, senast, skip;
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -188,7 +199,7 @@ rtimer(void *arg)
|
||||||
int nu = sluttid - getsecs();
|
int nu = sluttid - getsecs();
|
||||||
if (senast != nu) {
|
if (senast != nu) {
|
||||||
mtpr(20, PR_IPL);
|
mtpr(20, PR_IPL);
|
||||||
longjmp(jbuf);
|
longjmp(jbuf, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: boot.c,v 1.17 2001/05/02 15:33:14 matt Exp $ */
|
/* $NetBSD: boot.c,v 1.18 2002/05/31 15:58:26 ragge Exp $ */
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1982, 1986 The Regents of the University of California.
|
* Copyright (c) 1982, 1986 The Regents of the University of California.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
|
@ -131,6 +131,8 @@ Xmain(void)
|
||||||
}
|
}
|
||||||
skip = 1;
|
skip = 1;
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
if (setjmp(jbuf))
|
||||||
|
askname = 1;
|
||||||
|
|
||||||
/* First try to autoboot */
|
/* First try to autoboot */
|
||||||
if (askname == 0) {
|
if (askname == 0) {
|
||||||
|
@ -142,7 +144,8 @@ Xmain(void)
|
||||||
if (!filelist[fileindex].quiet)
|
if (!filelist[fileindex].quiet)
|
||||||
printf("> boot %s\n", filelist[fileindex].name);
|
printf("> boot %s\n", filelist[fileindex].name);
|
||||||
marks[MARK_START] = 0;
|
marks[MARK_START] = 0;
|
||||||
err = loadfile(filelist[fileindex].name, marks, LOAD_KERNEL|COUNT_KERNEL);
|
err = loadfile(filelist[fileindex].name, marks,
|
||||||
|
LOAD_KERNEL|COUNT_KERNEL);
|
||||||
if (err == 0) {
|
if (err == 0) {
|
||||||
machdep_start((char *)marks[MARK_ENTRY],
|
machdep_start((char *)marks[MARK_ENTRY],
|
||||||
marks[MARK_NSYM],
|
marks[MARK_NSYM],
|
||||||
|
|
Loading…
Reference in New Issue