#include "syscall.hpp"
#include "interrupt.h"
#include "kernel_log.hpp"
Go to the source code of this file.
◆ Syscall()
AArch64 系统调用处理
- Copyright
- Copyright The SimpleKernel Contributors
Definition at line 10 of file syscall.cpp.
10 {
11
12 uint64_t syscall_id = 0;
13 uint64_t args[6] = {0};
14
15 syscall_id = context_ptr->a7;
16 args[0] = context_ptr->
a0;
17 args[1] = context_ptr->a1;
18 args[2] = context_ptr->a2;
19 args[3] = context_ptr->a3;
20 args[4] = context_ptr->a4;
21 args[5] = context_ptr->a5;
22
23
25
26
27 context_ptr->
a0 =
static_cast<uint64_t
>(ret);
28
29 context_ptr->sepc += 4;
30}
auto syscall_dispatcher(int64_t syscall_id, uint64_t args[6]) -> int