Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm26/arm26 Separate out checkvectors(), so it can ...
details: https://anonhg.NetBSD.org/src/rev/ddd313767e97
branches: trunk
changeset: 500682:ddd313767e97
user: bjh21 <bjh21%NetBSD.org@localhost>
date: Sat Dec 16 16:45:11 2000 +0000
description:
Separate out checkvectors(), so it can be used elsewhere for debugging.
diffstat:
sys/arch/arm26/arm26/except.c | 21 +++++++++++++++++----
1 files changed, 17 insertions(+), 4 deletions(-)
diffs (61 lines):
diff -r aaf8d2e74e31 -r ddd313767e97 sys/arch/arm26/arm26/except.c
--- a/sys/arch/arm26/arm26/except.c Sat Dec 16 16:09:24 2000 +0000
+++ b/sys/arch/arm26/arm26/except.c Sat Dec 16 16:45:11 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: except.c,v 1.18 2000/12/11 23:51:58 bjh21 Exp $ */
+/* $NetBSD: except.c,v 1.19 2000/12/16 16:45:11 bjh21 Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 Ben Harris
* All rights reserved.
@@ -32,7 +32,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.18 2000/12/11 23:51:58 bjh21 Exp $");
+__KERNEL_RCSID(0, "$NetBSD: except.c,v 1.19 2000/12/16 16:45:11 bjh21 Exp $");
#include "opt_cputypes.h"
#include "opt_ddb.h"
@@ -70,6 +70,9 @@
#ifdef DEBUG
static void printregs(struct trapframe *tf);
#endif
+#ifdef DIAGNOSTIC
+void checkvectors();
+#endif
int want_resched;
@@ -82,7 +85,6 @@
userret(struct proc *p, vaddr_t pc, u_quad_t oticks)
{
int sig;
- u_int32_t *ptr;
/* take pending signals */
while ((sig = CURSIG(p)) != 0)
@@ -109,12 +111,23 @@
#ifdef DIAGNOSTIC
/* Mark trapframe as invalid. */
p->p_addr->u_pcb.pcb_tf = (void *)-1;
+ checkvectors();
+#endif
+}
+
+#ifdef DIAGNOSTIC
+void
+checkvectors()
+{
+ u_int32_t *ptr;
+
/* Check that the vectors are valid */
for (ptr = (u_int32_t *)0; ptr < (u_int32_t *)0x1c; ptr++)
if (*ptr != 0xe59ff114)
panic("CPU vectors mangled");
+}
#endif
-}
+
void
undefined_handler(struct trapframe *tf)
Home |
Main Index |
Thread Index |
Old Index