svn commit: r249832 - projects/amd64_xen_pv/sys/amd64/xen
Cherry G. Mathew
cherry at FreeBSD.org
Wed Apr 24 06:38:50 UTC 2013
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 */
More information about the svn-src-projects
mailing list