Method
int 0x80(vector) or sysenter
- same reg to KM stack
- invoke system call service routine
- exit handler
syscall_exit or sysexit
example
- fork ()
- fork{} in libc.a
- movl 2, %eax - 2 means fork, eax is register
- int 0x80(system call)
- go to (interrupt desciptor table)
- go to kernel mode function
- save all in stack
- check eax to function
- find sys call table that (2, fork)
- do ref_from_sys_call in entry.S