One syscall round trip

This figure documents the historical i386 source baseline. Current native x86-64/AArch64 qualification is recorded separately; this is not an ELF64 or native SMP implementation diagram.

One syscall round trip The user executes INT 0x80. The x86 entry stub saves registers and calls the kernel syscall handler. The handler validates buffers and dispatches the selected operation, writes the result into EAX and returns through the stub. IRET resumes ring-3 code; blocking operations may schedule other tasks before returning. u->u1 g->g1 k->k1 u1->u2 u1->g1 1  INT 0x80 u2->u3 u3->u4 u4->u5 g1->g2 g2->g3 g2->k2 2  saved registers g3->g4 g4->g5 g5->u5 5  IRET · ring 3 k1->k2 k2->k3 3  validate buffers; run selected operation k3->k4 k4->g4 4  result in EAX k4->k5 u User program g x86 gate / stub k Kernel handler u1 u2 u3 u4 u5 g1 g2 g3 g4 g5 k1 k2 k3 k4 k5
One syscall round trip The user executes INT 0x80. The x86 entry stub saves registers and calls the kernel syscall handler. The handler validates buffers and dispatches the selected operation, writes the result into EAX and returns through the stub. IRET resumes ring-3 code; blocking operations may schedule other tasks before returning. u->u1 g->g1 k->k1 u1->u2 u1->g1 1 INT 0x80 u2->u3 u3->u4 u4->u5 g1->g2 g2->g3 g2->k2 2 saved registers g3->g4 g4->g5 g5->u5 5 IRET · ring 3 k1->k2 k2->k3 3 validate buffers; run selected operation k3->k4 k4->g4 4 result in EAX k4->k5 u User program g x86 gate / stub k Kernel handler u1 u2 u3 u4 u5 g1 g2 g3 g4 g5 k1 k2 k3 k4 k5

Time runs downward; the saved register frame carries arguments and the result across the gate.

Text equivalent and source references
  • The user executes INT 0x80. The x86 entry stub saves registers and calls the kernel syscall handler.
  • The handler validates buffers and dispatches the selected operation, writes the result into EAX and returns through the stub. IRET resumes ring-3 code; blocking operations may schedule other tasks before returning.

Sequence diagram. Source paths refer to the atlas baseline; the kernel checkout is private.

  • arch/x86/interrupt.asm · isr128, isr_common_stub
  • kernel/core/syscall.c · syscall_handler
  • include/syscall.h · syscall ABI