PERFORCE change 132680 for review

John Birrell jb at FreeBSD.org
Sun Jan 6 23:27:33 PST 2008


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

Change 132680 by jb at jb_freebsd1 on 2008/01/07 07:27:20

	Add functions to set and clear the hook in the exception code.
	Note that the 'invop' reference is a legacy of Sun's implementation.
	On amd64 it isn't an "invalid opcode" interrupt at all (like on i386),
	but a breakpoint one instead. 
	
	The dtrace_invop_start is where the bulk of the OpenSolaris code will
	go (soon).

Affected files ...

.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_asm.S#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/amd64/dtrace_asm.S#2 (text+ko) ====

@@ -17,6 +17,11 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
+ *
+ * Portions Copyright 2008 John Birrell <jb at freebsd.org>
+ *
+ * $FreeBSD$
+ *
  */
 /*
  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
@@ -26,6 +31,34 @@
 #include <machine/asm.h>
 #include <sys/cpuvar_defs.h>
 
+#include "assym.s"
+
+	.globl	calltrap
+	.type	calltrap, at function
+	ENTRY(dtrace_invop_start)
+
+	/* XXX More code to go in here. :-) */
+
+	/* When all else fails handle the trap in the usual way. */
+	jmpq	*dtrace_invop_calltrap_addr
+	END(dtrace_invop_start)
+
+/*
+void dtrace_invop_init(void)
+*/
+	ENTRY(dtrace_invop_init)
+	movq	$dtrace_invop_start, dtrace_invop_jump_addr(%rip)
+	ret
+	END(dtrace_invop_init)
+
+/*
+void dtrace_invop_uninit(void)
+*/
+	ENTRY(dtrace_invop_uninit)
+	movq	$0, dtrace_invop_jump_addr(%rip)
+	ret
+	END(dtrace_invop_uninit)
+
 /*
 greg_t dtrace_getfp(void)
 */


More information about the p4-projects mailing list