From ffa5a3c2dd4eb887821699ba434cbb6eb93b23b8 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 19 May 2025 01:01:11 -0400 Subject: kernel: syscall: Add SYS_reboot syscall Signed-off-by: Ian Moffett --- sys/arch/amd64/amd64/reboot.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sys/arch/amd64') diff --git a/sys/arch/amd64/amd64/reboot.c b/sys/arch/amd64/amd64/reboot.c index 64db09e..d47a352 100644 --- a/sys/arch/amd64/amd64/reboot.c +++ b/sys/arch/amd64/amd64/reboot.c @@ -50,3 +50,13 @@ cpu_reboot(int method) outb(0x64, 0xFE); } } + +/* + * arg0: Method bits + */ +scret_t +sys_reboot(struct syscall_args *scargs) +{ + cpu_reboot(scargs->arg0); + __builtin_unreachable(); +} -- cgit v1.2.3