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:
32
src/kernel/tasking.inc
Normal file
32
src/kernel/tasking.inc
Normal file
@@ -0,0 +1,32 @@
|
||||
struc TCB
|
||||
.rsp: resq 1
|
||||
.rsp0: resq 1
|
||||
.pml4: resq 1
|
||||
endstruc
|
||||
|
||||
struc CPU_DATA
|
||||
.rsp0: resq 1
|
||||
.rsp3: resq 1
|
||||
.tcb: resq 1
|
||||
endstruc
|
||||
|
||||
struc TSS
|
||||
.res0: resd 1
|
||||
.rsp0: resq 1
|
||||
.rsp1: resq 1
|
||||
.rsp2: resq 1
|
||||
.ist0: resq 1
|
||||
.ist1: resq 1
|
||||
.ist2: resq 1
|
||||
.ist3: resq 1
|
||||
.ist4: resq 1
|
||||
.ist5: resq 1
|
||||
.ist6: resq 1
|
||||
.ist7: resq 1
|
||||
.res1: resq 1
|
||||
.res2: resw 1
|
||||
.iomap: resw 1
|
||||
endstruc
|
||||
|
||||
|
||||
; vim: ft=asm
|
||||
Reference in New Issue
Block a user