From 03068e0f6fe8d7dba0ce708973d1b30e9849ed6d Mon Sep 17 00:00:00 2001 From: fvdl Date: Thu, 4 Jul 2002 10:42:00 +0000 Subject: [PATCH] Print a little more info for unhandled traps. For the time being, halt the CPU, don't call panic() (until DDB is done). --- sys/arch/x86_64/x86_64/trap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/arch/x86_64/x86_64/trap.c b/sys/arch/x86_64/x86_64/trap.c index f751c52a52c9..534c5ab37f76 100644 --- a/sys/arch/x86_64/x86_64/trap.c +++ b/sys/arch/x86_64/x86_64/trap.c @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.7 2002/06/12 19:13:28 fvdl Exp $ */ +/* $NetBSD: trap.c,v 1.8 2002/07/04 10:42:00 fvdl Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -89,6 +89,7 @@ #include #include #include +#include #include @@ -216,11 +217,12 @@ trap(frame) printf("unknown trap %ld", (u_long)frame.tf_trapno); printf(" in %s mode\n", (type & T_USER) ? "user" : "supervisor"); printf("trap type %d code %lx rip %lx cs %lx rflags %lx cr2 " - " %lx cpl %x\n", + " %lx cpl %x rsp %lx\n", type, frame.tf_err, (u_long)frame.tf_rip, frame.tf_cs, - frame.tf_rflags, rcr2(), cpl); + frame.tf_rflags, rcr2(), cpl, frame.tf_rsp); - panic("trap"); + /* panic("trap"); */ + cpu_reboot(RB_HALT, NULL); /*NOTREACHED*/ case T_PROTFLT: