Search notes:

arch/x86/entry/entry_64.S

arch/x86/entry/entry_64.S contains the system-call and fault low-level handling routines.

Notes on argument passing

This source file comments which in which registers arguemnts to syscalls are passed:
rax system call number
rdi arg 0
rsi arg 1
rdx arg 2
r10 arg 3 (needs to be moved to rcx to conform to C ABI)
r8 arg 4
r9 arg 5
rcx return address (set by syscall instruction`)
r11 saved rflags (set by syscall instruction` / note: r11 is callee-clobbered register in C ABI)
Note: r12-r15, rbp, rbx are callee-preserved in C ABI.

entry_SYSCALL_64

entry_SYSCALL_64 is the entry point for 64-bit system calls (syscall instruction?).
This function calls do_syscall_64().
The address of entry_SYSCALL_64 is configured as handler for sys calls in syscall_init().

ret_from_fork_asm

A newly forked process directly context switches into this function («address»).

See also

For documentation see Documentation/x86/entry_64.txt
arch/x86/kernel/traps.c, arch/x86/entry/entry_32.S

Index