Skip to content

Syscall ABI

User code calls the kernel with ecall.

a7 = syscall number
a0 = arg0
a1 = arg1
a2 = arg2
NumberNameArgumentsReturn
1SYS_EXITnonedoes not return
2SYS_SLEEPa0 = millisecondsreturns after sleep
3SYS_YIELDnonereturns when scheduled again
10SYS_EP_CREATEnonea0 = endpoint ID
11SYS_EP_SENDa0 = endpoint, a1/a2 = messagea0 = 0 after delivery
12SYS_EP_RECVa0 = endpointa0/a1 = message
100SYS_PUTCHARa0 = bytenone

The capability chapter changes endpoint arguments from raw endpoint IDs to capability slots.