feature (syscalls): implemented nx_panic syscall

This commit is contained in:
antifallobst 2023-03-09 00:19:59 +01:00
parent 70db6f961c
commit 9b50ca77da
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,7 @@
#include "platform/syscall.h" #include "platform/syscall.h"
#include "utils/logger.h" #include "utils/logger.h"
#include "utils/panic.h"
#include "proc/scheduler.h" #include "proc/scheduler.h"
#include "drivers/fs/vfs.h" #include "drivers/fs/vfs.h"
@ -62,6 +63,10 @@ cpu_state_T* syscall_handle(cpu_state_T* state) {
return_state = scheduler_start(state); return_state = scheduler_start(state);
break; break;
} }
case SYSCALL_KERNEL_PANIC: {
panic(state, (string_t)arg1);
break;
}
default: { default: {
log(LOG_WARNING, "unhandled syscall: 0x%xw", state->rax); log(LOG_WARNING, "unhandled syscall: 0x%xw", state->rax);