Module Name:    src
Committed By:   cliff
Date:           Wed Feb 10 19:45:48 UTC 2010

Modified Files:
        src/sys/arch/mips/rmi [matt-nb5-mips64]: rmixl_subr.S

Log Message:
save gp and t8 before callback to firmware


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/sys/arch/mips/rmi/rmixl_subr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/mips/rmi/rmixl_subr.S
diff -u src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.3 src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.4
--- src/sys/arch/mips/rmi/rmixl_subr.S:1.1.2.3	Sun Jan 24 05:39:57 2010
+++ src/sys/arch/mips/rmi/rmixl_subr.S	Wed Feb 10 19:45:48 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: rmixl_subr.S,v 1.1.2.3 2010/01/24 05:39:57 cliff Exp $	*/
+/*	$NetBSD: rmixl_subr.S,v 1.1.2.4 2010/02/10 19:45:48 cliff Exp $	*/
 
 #include "opt_cputype.h"
 
@@ -43,10 +43,12 @@
 /*
  * rmixlfw_wakeup_cpu(func, args, mask, callback)
  */
-NESTED(rmixlfw_wakeup_cpu, CALLFRAME_SIZ, ra)
-	PTR_ADDU	sp, sp, -CALLFRAME_SIZ
+NESTED(rmixlfw_wakeup_cpu, CALLFRAME_SIZ+2*SZREG, ra)
+	PTR_ADDU	sp, sp, -(CALLFRAME_SIZ+2*SZREG)
 	REG_S		ra, CALLFRAME_RA(sp)
 	REG_S		s0, CALLFRAME_S0(sp)
+	REG_S		gp, CALLFRAME_SIZ+0*SZREG(sp)
+	REG_S		t8, CALLFRAME_SIZ+1*SZREG(sp)
 
 	move		s0, sp			/* save sp */
 	srl		t0, sp, 0		/* nuke upper half */
@@ -55,10 +57,12 @@
 	 or		sp, t0, t1		/* delay slot */
 	move		sp, s0			/* restore sp */
 
+	REG_L		t8, CALLFRAME_SIZ+1*SZREG(sp)
+	REG_L		gp, CALLFRAME_SIZ+0*SZREG(sp)
 	REG_L		s0, CALLFRAME_S0(sp)
 	REG_L		ra, CALLFRAME_RA(sp)
 	jr		ra
-	 PTR_ADDU	sp, sp, CALLFRAME_SIZ	/* delay slot */
+	 PTR_ADDU	sp, sp, (CALLFRAME_SIZ+2*SZREG)	/* delay slot */
 END(rmixlfw_wakeup_cpu)
 
 /*

Reply via email to