mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 08:24:32 -08:00
Simplify task switches
No longer using the rsp from the entry to the kernel, but instead switching rsp at task-switching time in assembly. This currently breaks fork()
This commit is contained in:
@@ -7,12 +7,11 @@ ramdisk_process_loader:
|
||||
; create_process already pushed a cpu_state onto the stack for us, this
|
||||
; acts both as the cpu_state parameter to load_process, and the saved
|
||||
; state for the following iretq
|
||||
;
|
||||
; Additional parameters:
|
||||
; rdi - the address of the program image
|
||||
; rsi - the size of the program image
|
||||
; rdx - the address of this process' process structure
|
||||
; rcx - the stack pointer, which points at the cpu_state
|
||||
|
||||
pop rdi ; the address of the program image
|
||||
pop rsi ; the size of the program image
|
||||
pop rdx ; the address of this process' process structure
|
||||
pop rcx ; the cpu_state
|
||||
call load_process
|
||||
|
||||
swapgs
|
||||
|
||||
Reference in New Issue
Block a user