PERFORCE change 101680 for review

Kip Macy kmacy at FreeBSD.org
Sun Jul 16 04:07:18 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101680

Change 101680 by kmacy at kmacy_storage:sun4v_work_stable on 2006/07/16 04:07:03

	ensure that context is set so that a trap here is attributed to the user process

Affected files ...

.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/include/mmu.h#2 edit
.. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/wbuf.S#2 edit

Differences ...

==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/include/mmu.h#2 (text+ko) ====

@@ -85,6 +85,7 @@
  * are ever valid in it (so any user access pagefaults).
  */
 #define	KCONTEXT	0
+#define CTX_OTHER_SHIFT 16
 
 /*
  * FLUSH_ADDR is used in the flush instruction to guarantee stores to mmu

==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/wbuf.S#2 (text+ko) ====

@@ -145,9 +145,11 @@
 	wrpr	%g0, %g1, %tpc
 	add	%g1, 4, %g1
 	wrpr	%g0, %g1, %tnpc
-
+	
 	set	trap, %g1
-	mov	%g5, %g2	
+	mov	1, %g2
+	sllx	%g2, CTX_OTHER_SHIFT, %g2
+	or	%g5, %g2, %g2	
 	mov	%g6, %g3
 
 	sub	%g0, 1, %g4


More information about the p4-projects mailing list