Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2008 02:55:45 GMT
From:      "Randall R. Stewart" <rrs@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 135084 for review
Message-ID:  <200802090255.m192tjej043993@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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