PERFORCE change 49432 for review
Juli Mallett
jmallett at FreeBSD.org
Sat Mar 20 20:51:29 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=49432
Change 49432 by jmallett at 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
More information about the p4-projects
mailing list