Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/vax/boot/boot Handle machine checks separate from o...
details: https://anonhg.NetBSD.org/src/rev/5b95a98e167e
branches: trunk
changeset: 532108:5b95a98e167e
user: ragge <ragge%NetBSD.org@localhost>
date: Fri May 31 15:58:26 2002 +0000
description:
Handle machine checks separate from other "stray" interrupts.
diffstat:
sys/arch/vax/boot/boot/autoconf.c | 19 +++++++++++++++----
sys/arch/vax/boot/boot/boot.c | 7 +++++--
2 files changed, 20 insertions(+), 6 deletions(-)
diffs (89 lines):
diff -r 0a29df5be9c2 -r 5b95a98e167e sys/arch/vax/boot/boot/autoconf.c
--- a/sys/arch/vax/boot/boot/autoconf.c Fri May 31 15:52:55 2002 +0000
+++ b/sys/arch/vax/boot/boot/autoconf.c Fri May 31 15:58:26 2002 +0000
@@ -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.
* All rights reserved.
@@ -51,7 +51,7 @@
void scbinit(void);
int getsecs(void);
void scb_stray(void *);
-void longjmp(int *);
+void longjmp(int *, int);
void rtimer(void *);
long *bootregs;
@@ -133,6 +133,17 @@
struct ivec_dsp **scb;
struct ivec_dsp *scb_vec;
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,
@@ -163,6 +174,7 @@
scb_vec[i].ev = NULL;
}
scb_vec[0xc0/4].hoppaddr = rtimer;
+ scb_vec[4/4].hoppaddr = mcheck;
if (vax_boardtype != VAX_BTYP_VXT)
mtpr(-10000, PR_NICR); /* Load in count register */
@@ -171,7 +183,6 @@
mtpr(20, PR_IPL);
}
-extern int jbuf[10];
extern int sluttid, senast, skip;
void
@@ -188,7 +199,7 @@
int nu = sluttid - getsecs();
if (senast != nu) {
mtpr(20, PR_IPL);
- longjmp(jbuf);
+ longjmp(jbuf, 1);
}
}
}
diff -r 0a29df5be9c2 -r 5b95a98e167e sys/arch/vax/boot/boot/boot.c
--- a/sys/arch/vax/boot/boot/boot.c Fri May 31 15:52:55 2002 +0000
+++ b/sys/arch/vax/boot/boot/boot.c Fri May 31 15:58:26 2002 +0000
@@ -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.
* All rights reserved.
@@ -131,6 +131,8 @@
}
skip = 1;
printf("\n");
+ if (setjmp(jbuf))
+ askname = 1;
/* First try to autoboot */
if (askname == 0) {
@@ -142,7 +144,8 @@
if (!filelist[fileindex].quiet)
printf("> boot %s\n", filelist[fileindex].name);
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) {
machdep_start((char *)marks[MARK_ENTRY],
marks[MARK_NSYM],
Home |
Main Index |
Thread Index |
Old Index