PERFORCE change 215041 for review
Robert Watson
rwatson at FreeBSD.org
Sat Jul 28 11:39:30 UTC 2012
http://p4web.freebsd.org/@@215041?ac=10
Change 215041 by rwatson at rwatson_svr_ctsrd_mipsbuild on 2012/07/28 11:38:28
Add explicit comments that C2 EPCC is saved and restored by
SAVE_CP2_CONTEXT() and RESTORE_CP2_CONTEXT() near saving and
restoring of C0 EPC.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#6 edit
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#7 edit
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/exception.S#6 (text+ko) ====
@@ -484,6 +484,9 @@
SAVE_U_PCB_REG(a2, BADVADDR, k1)
SAVE_U_PCB_REG(a3, PC, k1)
#ifdef CPU_CHERI
+ /*
+ * Note: This saves EPCC, matching the explicit EPC save above.
+ */
SAVE_CP2_CONTEXT(t0, k1)
#endif
REG_S a3, CALLFRAME_RA(sp) # for debugging
@@ -536,6 +539,9 @@
SAVE_U_PCB_REG(a1, SR, k1)
#ifdef CPU_CHERI
+ /*
+ * Note: This restores EPCC, matching the explicit EPC restore below.
+ */
RESTORE_CP2_CONTEXT(t0, k1)
#endif
RESTORE_U_PCB_REG(t0, MULLO, k1)
@@ -754,6 +760,9 @@
SAVE_U_PCB_REG(a1, CAUSE, k1)
SAVE_U_PCB_REG(a3, PC, k1) # PC in a3, note used later!
#ifdef CPU_CHERI
+ /*
+ * Note: This saves EPCC, matching the explicit EPC save above.
+ */
SAVE_CP2_CONTEXT(t0, k1)
#endif
PTR_SUBU sp, k1, CALLFRAME_SIZ # switch to kernel SP
@@ -815,6 +824,9 @@
SAVE_U_PCB_REG(a1, SR, k1)
#ifdef CPU_CHERI
+ /*
+ * Note: This restores EPCC, matching the explicit EPC restore below.
+ */
RESTORE_CP2_CONTEXT(t0, k1)
#endif
RESTORE_U_PCB_REG(s0, S0, k1)
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/swtch.S#7 (text+ko) ====
@@ -122,6 +122,9 @@
PTR_L k1, PC_CURPCB(k1)
#ifdef CPU_CHERI
+ /*
+ * Note: This restores EPCC, matching the explicit EPC restore below.
+ */
RESTORE_CP2_CONTEXT(t0, k1)
#endif
RESTORE_U_PCB_REG(t0, MULLO, k1)
More information about the p4-projects
mailing list