From owner-p4-projects@FreeBSD.ORG Wed Apr 11 18:33:56 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6408816A408; Wed, 11 Apr 2007 18:33:56 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3773616A406 for ; Wed, 11 Apr 2007 18:33:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 2E8B813C48C for ; Wed, 11 Apr 2007 18:33:56 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l3BIXuHj037526 for ; Wed, 11 Apr 2007 18:33:56 GMT (envelope-from gonzo@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l3BIXu3K037522 for perforce@freebsd.org; Wed, 11 Apr 2007 18:33:56 GMT (envelope-from gonzo@FreeBSD.org) Date: Wed, 11 Apr 2007 18:33:56 GMT Message-Id: <200704111833.l3BIXu3K037522@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko To: Perforce Change Reviews Cc: Subject: PERFORCE change 117912 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Apr 2007 18:33:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=117912 Change 117912 by gonzo@gonzo_jeeves on 2007/04/11 18:32:59 o Do not mess with sp in trapframe. Save it as-is. Otherwise ddb failes to unwind call stack. Affected files ... .. //depot/projects/mips2/src/sys/mips/mips/exception.S#22 edit Differences ... ==== //depot/projects/mips2/src/sys/mips/mips/exception.S#22 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#21 $ + * $P4: //depot/projects/mips2/src/sys/mips/mips/exception.S#22 $ */ /* $NetBSD: mipsX_subr.S,v 1.19 2005/12/11 12:18:09 christos Exp $ */ @@ -286,11 +286,11 @@ LEAF(GenericException) .set noat - subu sp, sp, TF_SIZE la k0, 1f j exception_save_registers - move k1, sp + subu k1, sp, TF_SIZE 1: + subu sp, sp, TF_SIZE /* * A generic exception may result in DDB being invoked. If we @@ -329,7 +329,6 @@ jal exception_restore_registers nop - addu sp, sp, TF_SIZE eret .set at @@ -345,11 +344,11 @@ LEAF(KernIntr) .set noat - subu sp, sp, TF_SIZE la k0, 1f j exception_save_registers - move k1, sp + subu k1, sp, TF_SIZE 1: + subu sp, sp, TF_SIZE /* * A generic exception may result in DDB being invoked. If we @@ -384,7 +383,6 @@ jal exception_restore_registers nop - addu sp, sp, TF_SIZE eret .set at @@ -920,13 +918,6 @@ sw a0, TF_REG_MULHI(k1) sw a1, TF_REG_EPC(k1) - /* - * When restore returns, TF_SIZE gets added to the SP for - * return. So in restore, we subtract TF_SIZE, which means - * the value stored herein will be the value returned to. - * To accomodate this, we add TF_SIZE, which makes up for the - * initial subtraction for the trapframe. - */ sw sp, TF_REG_SP(k1) sw gp, TF_REG_GP(k1) @@ -964,3 +955,4 @@ nop END(save_kdbaux) #endif /* DDB */ +