linuxlinux-kernelarmsystem-calls

What is the interface for ARM system calls and where is it defined in the Linux kernel?


I have read about system calls in Linux, and everywhere descriptions are 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?

A few relevant files which I found are:

arch/arm/kernel/calls.S

arch/arm/kernel/entry-common.S (explanation needed)


Solution

  • In ARM world, you do a software interrupt (mechanism to signal the kernel) by supervisor call / svc (previously called SWI).

    ARM assembly (UAL) syntax looks like this:

    SVC{<c>}{<q>} {#}<imm>
    

    (In Linux you need to pass #0)

    You should cheat from other projects like bionic or uClibc.