x86_64 cpu: change how the current cpu pointer is found

This commit is contained in:
Matheus
2024-09-15 15:26:40 -03:00
parent 560e3c0aa1
commit 5382a8249b
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -208,7 +208,7 @@ arch_syscall_entry:
; because it's still using the user stack
mov cr2, rax
; rax can be used just fine now
mov rax, [gs:0x0] ; cpu pointer
mov rax, [gs:0x8] ; cpu pointer
mov rax, [rax] ; thread pointer
mov rax, [rax] ; kernel stack top
xchg rsp, rax ; switch stack pointers