Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2008 07:27:32 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132680 for review
Message-ID:  <200801070727.m077RWGi028244@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132680

Change 132680 by jb@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@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,@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)
 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801070727.m077RWGi028244>