## Goal Implement a syscall dispatch path so that user programs can request kernel services safely. ## Tasks - [ ] Add `SVC #0` entry in `vector.s`: save GPRs, call C dispatcher - [ ] Define initial syscall table: `SYS_WRITE=1`, `SYS_EXIT=60`, `SYS_GETPID=39` - [ ] Implement `sys_write(fd, buf_va, len)`: validate user VA, write to UART - [ ] Implement `sys_exit(code)`: mark task dead, schedule - [ ] Implement `sys_getpid()`: return current task ID - [ ] Add user-side `syscall.h` with inline wrappers - [ ] Test: user task prints "Hello from EL0" via `sys_write`
Goal
Implement a syscall dispatch path so that user programs can request kernel services safely.
Tasks
SVC #0entry invector.s: save GPRs, call C dispatcherSYS_WRITE=1,SYS_EXIT=60,SYS_GETPID=39sys_write(fd, buf_va, len): validate user VA, write to UARTsys_exit(code): mark task dead, schedulesys_getpid(): return current task IDsyscall.hwith inline wrapperssys_write