System Calls
System calls (syscalls) are a type of KPC. They allow a process to ask Nova to perform a task.
Overview
Syscalls are performed using CPU interruptions to notify Nova.
System calls always return two numbers: a 8-bit errcode and 8 bytes return value. If the errcode is not null, then an error occured during the syscall. Certain error codes indicate certain errors:
0x00
: cannot read syscall's code or arguments0x01
: syscall does not exists0x02
: at least one argument is invalid (e.g. providing a pointer to the0
address)0x03
: unmapped memory pointer0x04
: memory permission error0x10
-0x1F
: invalid argument(s) provided0x20
-0x2F
: provided arguments are not valid in the current context (in relation with other arguments)0x30
-0x3F
: provided arguments are not valid (after resources checking)0x40
-0x4F
: resource access error0x50
-0x5F
: hardware errors0x60
-0x6F
: other types of errors
The codes of system calls are also categorized as follows:
0x00
-0x0F
: signal handling0x10
-0x1F
: process management0x20
-0x2F
: pipes0x30
-0x3F
: memory management0x40
-0x4F
: process management0x50
-0x5F
: hardware interaction- TODO...
List of System Calls
TODO