Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2004 20:51:28 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 49432 for review
Message-ID:  <200403210451.i2L4pSlu063435@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=49432

Change 49432 by jmallett@jmallett_oingo on 2004/03/20 20:50:51

	Stay kernel mode without exceptions through exception processing.

Affected files ...

.. //depot/projects/mips/sys/mips/mips/exception.S#24 edit

Differences ...

==== //depot/projects/mips/sys/mips/mips/exception.S#24 (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/mips/sys/mips/mips/exception.S#23 $
+ * $P4: //depot/projects/mips/sys/mips/mips/exception.S#24 $
  */
 
 #include "opt_ddb.h"
@@ -121,19 +121,31 @@
 	jal	save_kdbaux
 	nop
 #endif /* DDB */
+	li	t0, MIPS_SR_KX
+	mtc0	t0, MIPS_COP_0_STATUS
 
 	/*
 	 * Call trap() with arguments:
 	 * trapframe, cause, badvaddr.
 	 *
 	 * The trapframe is copied from k1 to a0 in the BDslot.
+	 *
+	 * trap returns the frame.
 	 */
 	mfc0	a1, MIPS_COP_0_CAUSE
 	dmfc0	a2, MIPS_COP_0_BAD_VADDR
 	jal	trap
 	move	a0, k1
 
-	move	k1, sp
+	/*
+	 * Make sure interrupts are disabled for the purposes of
+	 * having a clean go at restoring.
+	 */
+	mtc0	zero, MIPS_COP_0_CAUSE
+	li	t0, MIPS_SR_KX
+	mtc0	t0, MIPS_COP_0_STATUS
+
+	move	k1, v0
 	jal	exception_restore_registers
 	nop
 	daddu	sp, sp, TF_SIZE



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200403210451.i2L4pSlu063435>