I have read about system calls in Linux, and everywhere description is given regarding x86 architecture (0x80
interrupt and SYSENTER
). But I am not able to track down the files and process for a system call in ARM architecture. Can anyone please help.
Few relevant files which I got to know are:
arch/arm/kernel/calls.S
arch/arm/kernel/entry-common.S (explanation needed)
Best Answer
More generic answer than what you asked.
On Linux the
man syscall (2)
is a good start to find out how to make a system call in various architectures.Copied from that manpage:
So it depends whether the system uses OABI or EABI.
So in EABI you use
r7
to pass the system call number, user0-r6
to pass the arguments, useSWI 0
to make the system call, expect the result inr0
.In OABI everything is the same except you use
SWI <number>
to make a system call.