Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Apr 2013 06:38:50 +0000 (UTC)
From:      "Cherry G. Mathew" <cherry@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r249832 - projects/amd64_xen_pv/sys/amd64/xen
Message-ID:  <201304240638.r3O6coLS097391@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cherry
Date: Wed Apr 24 06:38:49 2013
New Revision: 249832
URL: http://svnweb.freebsd.org/changeset/base/249832

Log:
  Translate the calling conventions from the syscall abi to the C abi.
  Fixes bogus arguments going to syscalls.
  
  Approved by: gibbs(implicit)

Modified:
  projects/amd64_xen_pv/sys/amd64/xen/exception.S

Modified: projects/amd64_xen_pv/sys/amd64/xen/exception.S
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/xen/exception.S	Wed Apr 24 06:34:56 2013	(r249831)
+++ projects/amd64_xen_pv/sys/amd64/xen/exception.S	Wed Apr 24 06:38:49 2013	(r249832)
@@ -562,7 +562,11 @@ IDTVEC(syscall_callback)
 	TRAP_PROLOGUE(T_USER)	;
 	SAVE_SEGMENT_REGS	;
 	SAVE_GENERAL_REGS	;
-	DO_STI_MAYBE		;
+	movq	%r11, TF_RFLAGS(%rsp) ; /* Tweak for INTR_EXIT */
+	movq	%r10, %rcx	; /* Translate to C abi */
+	movq	%rcx, TF_RCX(%rsp) ; /* Cosmetic. XXX: discard */
+	DO_STI_MAYBE		; /* Clobbers %rdi */
+	movq	TF_RDI(%rsp), %rdi ;
 	CALLSYSCALL		;
 	DO_AST_MAYBE		;
 	RESTORE_GENERAL_REGS	; /* XXX: optimise for SYSRET */



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