From owner-p4-projects@FreeBSD.ORG Sat Feb 9 02:55:46 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2156D16A475; Sat, 9 Feb 2008 02:55:46 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DB54D16A473 for ; Sat, 9 Feb 2008 02:55:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id CD24A13C468 for ; Sat, 9 Feb 2008 02:55:45 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m192tj2B043996 for ; Sat, 9 Feb 2008 02:55:45 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m192tjej043993 for perforce@freebsd.org; Sat, 9 Feb 2008 02:55:45 GMT (envelope-from rrs@cisco.com) Date: Sat, 9 Feb 2008 02:55:45 GMT Message-Id: <200802090255.m192tjej043993@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135084 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: Sat, 09 Feb 2008 02:55:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=135084 Change 135084 by rrs@rrs-mips2-jnpr on 2008/02/09 02:55:05 Fix a bug in TARGET_OCTEON. We were calling a clear function in the exception handler and then calling trap. Trap expects that a0 will have the stack frame pointer, the line above the CLEAR_STATUS sets the stack frame pointer into a0, but the octeon specific CLEAR_STATUS uses a0 thus blasting the arg to trap. re-arrange the lines so the clear status happens BEFORE the save off of the stack. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/exception.S#14 (text+ko) ==== @@ -160,6 +160,7 @@ mfc0 k0, COP_0_BAD_VADDR #09: k0=bad address (again) beq k1, zero, 2f #0a: ==0 -- no page table srl k0, PGSHIFT - 2 #0b: k0=VPN (aka va>>10) + andi k0, k0, ((NPTEPG/2) - 1) << 3 #0c: k0=page tab offset addu k1, k1, k0 #0d: k1=pte address lw k0, 0(k1) #0e: k0=lo0 pte @@ -303,8 +304,8 @@ SAVE_REG(a3, PC, sp) ;\ addu v0, sp, KERN_EXC_FRAME_SIZE ;\ SAVE_REG(v0, SP, sp) ;\ + CLEAR_STATUS ;\ addu a0, sp, STAND_ARG_SIZE ;\ - CLEAR_STATUS ;\ ITLBNOPFIX #ifdef DDB