X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Fproc.asm;h=3de4e0a3efa3fad895efaa2175ebb3984795fbae;hb=89a520c7cbe3ad16aaab21a46475fae0c604ab15;hp=00ea9e1e6012f0a76630b7273633fa897835a5f2;hpb=19435a203712447b8a1e17bbe7141b4b1741d917;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/proc.asm b/Kernel/arch/x86/proc.asm index 00ea9e1e..3de4e0a3 100644 --- a/Kernel/arch/x86/proc.asm +++ b/Kernel/arch/x86/proc.asm @@ -262,7 +262,7 @@ SpawnTask: .parent: ret -; void Proc_ReturnToUser(void *Method, Uint Parameter) +; void Proc_ReturnToUser(void *Method, Uint Parameter, tVAddr KernelStack) ; Calls a user fault handler ; [global Proc_ReturnToUser] @@ -274,12 +274,8 @@ Proc_ReturnToUser: ; [EBP+12]: parameter ; [EBP+16]: kernel stack top - ;call Proc_GetCurThread - - ; EAX is the current thread - ;mov ebx, eax - ;mov eax, [ebx+12*4] ; Get Kernel Stack - mov eax, [ebp+16] ; Get Kernel Stack + ; Get kernel stack + mov eax, [ebp+16] sub eax, KSTACK_USERSTATE_SIZE ; @@ -345,10 +341,6 @@ Proc_ReturnToUser: [global GetCPUNum] GetCPUNum: ; TODO: Store in debug registers -; xor eax, eax -; str ax -; sub ax, 0x30 -; shr ax, 3 ; ax /= 8 mov eax, dr1 ret