RISC-V Topic Guide

System Call

RISC-V system calls are defined by the execution environment or OS ABI; in common Unix/Linux environments, U-mode ECALL raises an environment-call-from-U-mode exception that may be delegated to S-mode via medeleg, with the syscall number in a7 and up to six arguments typically in a0-a5.

ECALLa7a0-a5sepcmepcscausemcausemedelegSRETenvironment call