Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jul 2010 19:59:15 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r209955 - head/sys/amd64/amd64
Message-ID:  <201007121959.o6CJxFuN002411@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Mon Jul 12 19:59:15 2010
New Revision: 209955
URL: http://svn.freebsd.org/changeset/base/209955

Log:
  When switching the thread from the processor, store %dr7 content
  into the pcb before disabling watchpoints. Otherwise, when the
  thread is restored on a processor, watchpoints are still disabled.
  
  Submitted by:	Tijl Coosemans <tijl coosemans org>
  	(I would be much happier if Tijl commited this himself)
  MFC after:	1 week

Modified:
  head/sys/amd64/amd64/cpu_switch.S

Modified: head/sys/amd64/amd64/cpu_switch.S
==============================================================================
--- head/sys/amd64/amd64/cpu_switch.S	Mon Jul 12 19:09:18 2010	(r209954)
+++ head/sys/amd64/amd64/cpu_switch.S	Mon Jul 12 19:59:15 2010	(r209955)
@@ -243,13 +243,13 @@ store_dr:
 	movq	%dr2,%r13
 	movq	%dr3,%r12
 	movq	%dr6,%r11
-	andq	$0x0000fc00, %rax		/* disable all watchpoints */
 	movq	%r15,PCB_DR0(%r8)
 	movq	%r14,PCB_DR1(%r8)
 	movq	%r13,PCB_DR2(%r8)
 	movq	%r12,PCB_DR3(%r8)
 	movq	%r11,PCB_DR6(%r8)
 	movq	%rax,PCB_DR7(%r8)
+	andq	$0x0000fc00, %rax		/* disable all watchpoints */
 	movq	%rax,%dr7
 	jmp	done_store_dr
 



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