From 930f69c4980676616406574b60ef06d5824f18c8 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Thu, 20 Feb 2025 23:01:28 +0100 Subject: [PATCH] core: Don't set the second thread argument to zero This defeated the point of passing the page tables to init, since rsi would be set to zero anyway. --- core/src/arch/x86_64/thread.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/arch/x86_64/thread.zig b/core/src/arch/x86_64/thread.zig index ae89acf..3bfe88f 100644 --- a/core/src/arch/x86_64/thread.zig +++ b/core/src/arch/x86_64/thread.zig @@ -14,7 +14,6 @@ pub inline fn enterTask(regs: *interrupts.InterruptStackFrame, comptime base: u6 \\ mov $0, %rbx \\ mov $0, %rcx \\ mov $0, %rdx - \\ mov $0, %rsi \\ mov $0, %rbp \\ mov $0, %r8 \\ mov $0, %r9 @@ -31,7 +30,8 @@ pub inline fn enterTask(regs: *interrupts.InterruptStackFrame, comptime base: u6 [rflags] "r" (regs.rflags), [cs] "r" (regs.cs), [rip] "r" (regs.rip), - [arg] "{rdi}" (regs.rdi), + [arg0] "{rdi}" (regs.rdi), + [arg1] "{rsi}" (regs.rsi), [base] "r" (base), [directory] "r" (directory), );