Page MenuHomeFreeBSD

D40153.diff
No OneTemporary

D40153.diff

diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -124,6 +124,23 @@
LINUX_VDSO_SYM_INTPTR(kern_tsc_selector);
LINUX_VDSO_SYM_INTPTR(kern_cpu_selector);
+/*
+ * According to the Intel x86 ISA 64-bit syscall
+ * saves %rip to %rcx and rflags to %r11. Registers on syscall entry:
+ * %rax system call number
+ * %rcx return address
+ * %r11 saved rflags
+ * %rdi arg1
+ * %rsi arg2
+ * %rdx arg3
+ * %r10 arg4
+ * %r8 arg5
+ * %r9 arg6
+ *
+ * Then FreeBSD fast_syscall() move registers:
+ * %rcx -> trapframe.tf_rip
+ * %r10 -> trapframe.tf_rcx
+ */
static int
linux_fetch_syscall_args(struct thread *td)
{

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 14, 12:06 PM (21 h, 39 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
38906076
Default Alt Text
D40153.diff (728 B)

Event Timeline