summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-19 20:06:55 -0400
committerIan Moffett <ian@osmora.org>2024-03-19 20:06:55 -0400
commit63f8814b8b5629a84562be6b756c8f50c10c1677 (patch)
tree09b69554da37f027019053a11845d305608c8faf
parent6828c7b57019f458988ebadd13914327312981e7 (diff)
kernel: syscall: Fix syscall order
Signed-off-by: Ian Moffett <ian@osmora.org>
-rw-r--r--sys/arch/amd64/amd64/syscall.c5
-rw-r--r--sys/include/sys/syscall.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/amd64/syscall.c b/sys/arch/amd64/amd64/syscall.c
index 68235d5..b0abe7f 100644
--- a/sys/arch/amd64/amd64/syscall.c
+++ b/sys/arch/amd64/amd64/syscall.c
@@ -36,9 +36,10 @@ __syscall(struct trapframe *tf)
.code = tf->rax,
.arg0 = tf->rdi,
.arg1 = tf->rsi,
- .arg2 = tf->rcx,
- .arg3 = tf->r8,
+ .arg2 = tf->rdx,
+ .arg3 = tf->r10,
.arg4 = tf->r9,
+ .arg5 = tf->r8,
.sp = tf->rsp
};
diff --git a/sys/include/sys/syscall.h b/sys/include/sys/syscall.h
index 66dc5f3..b78e2ad 100644
--- a/sys/include/sys/syscall.h
+++ b/sys/include/sys/syscall.h
@@ -43,7 +43,8 @@ enum {
struct syscall_args {
uint64_t code;
- uint64_t arg0, arg1, arg2, arg3, arg4;
+ uint64_t arg0, arg1, arg2;
+ uint64_t arg3, arg4, arg5, arg6;
uint64_t ip;
uint64_t sp;
};