Skip to main content

syscall_from_register_arguments_trd104

Function syscall_from_register_arguments_trd104 

Source
pub fn syscall_from_register_arguments_trd104(
    syscall_number: u8,
    r0: usize,
    r1: MachineRegister,
    r2: MachineRegister,
    r3: MachineRegister,
) -> Option<Syscall>
Expand description

Helper function for converting raw values passed back from an application into a Syscall type.

The Syscall represents a typed version of a system call invocation. The method returns None if the values do not specify a valid system call.

Different architectures have different ABIs for a process and the kernel to exchange data. The 32-bit ABI for CortexM and RISCV microcontrollers is specified in TRD104.