feat: add threading to Scheduler, fix desktop background selection freeze issue
This commit is contained in:
@@ -74,6 +74,7 @@ SyscallEntry:
|
||||
; JumpToUserMode -- initial transition to ring 3 via IRETQ
|
||||
; RDI = user RIP (entry point)
|
||||
; RSI = user RSP (top of user stack)
|
||||
; RDX = user RDI (first SystemV arg, e.g. thread arg; 0 for new processes)
|
||||
; ====================================================================
|
||||
global JumpToUserMode
|
||||
JumpToUserMode:
|
||||
@@ -86,5 +87,11 @@ JumpToUserMode:
|
||||
push 0x202 ; RFLAGS (IF=1)
|
||||
push 0x23 ; CS = UserCode | RPL3
|
||||
push rdi ; RIP = entry point
|
||||
mov rdi, rdx ; SystemV arg #1 -> user RDI
|
||||
xor rsi, rsi ; zero argv-ish registers for hygiene
|
||||
xor rdx, rdx
|
||||
xor rcx, rcx
|
||||
xor r8, r8
|
||||
xor r9, r9
|
||||
swapgs ; switch from kernel GS to user GS
|
||||
iretq
|
||||
|
||||
Reference in New Issue
Block a user