| 1 | #include <console/printf.h> |
| 2 | #include <stdint.h> |
| 3 | |
| 4 | /* Only called from syscall.asm */ |
| 5 | void syscall_handler(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, |
| 6 | uint64_t arg4, uint64_t arg5); |
| 7 | void syscall_handler(uint64_t num, uint64_t arg1, uint64_t arg2, uint64_t arg3, |
| 8 | uint64_t arg4, uint64_t arg5) { |
| 9 | cc_ignore(arg2, arg3, arg4, arg5); |
| 10 | switch (num) { |
| 11 | case 1: printf(format: "%s" , (char *) arg1); break; |
| 12 | default: printf(format: "Unknown syscall: %lu\n" , num); break; |
| 13 | } |
| 14 | } |
| 15 | |