Rework syscall ABI.

Syscalls now accept two parameters, allowing for things like "int count = read(buf, len)"
Rather than providing safe signatures for syscalls, the user is now given helper functions to safely parse incoming values, c-strings and slices.
This commit is contained in:
Toby Jaffey 2025-12-09 21:51:35 +00:00
parent f046a590c0
commit 76fba39a21
28 changed files with 543 additions and 537 deletions

View file

@ -1,11 +1,12 @@
// Definitions needed by both host and target
// syscalls for exposed host functions, start at 0
#define UVM32_SYSCALL_PRINTC 0x00000000
#define UVM32_SYSCALL_PUTC 0x00000000
#define UVM32_SYSCALL_GETC 0x00000001
#define UVM32_SYSCALL_PRINT 0x00000002
#define UVM32_SYSCALL_PRINTLN 0x00000003
#define UVM32_SYSCALL_PRINTD 0x00000004
#define UVM32_SYSCALL_PRINTX 0x00000005
#define UVM32_SYSCALL_PRINTDEC 0x00000004
#define UVM32_SYSCALL_PRINTHEX 0x00000005
#define UVM32_SYSCALL_MILLIS 0x00000006
#define UVM32_SYSCALL_PRINTBUF 0x00000007