Kernel/x86_64 - Debugging
authorJohn Hodge (sonata) <[email protected]>
Sun, 18 Nov 2012 05:39:11 +0000 (13:39 +0800)
committerJohn Hodge (sonata) <[email protected]>
Sun, 18 Nov 2012 05:39:11 +0000 (13:39 +0800)
KernelLand/Kernel/arch/x86_64/proc.asm
KernelLand/Kernel/arch/x86_64/proc.c

index f540b3b..f44d65b 100644 (file)
@@ -21,7 +21,7 @@ NewTaskHeader:
        mov rdi, [rsp+0x10]
        mov rax, [rsp+0x8]
        add rsp, 0x10   ; Reclaim stack space (thread/fcn)
-       xchg bx, bx
+       ;xchg bx, bx
        call rax
        
        ; Quit thread with RAX as the return code
index 48504a8..884babb 100644 (file)
@@ -758,7 +758,7 @@ void Proc_Reschedule(void)
 
        // Update CPU state
        gaCPUs[cpu].Current = nextthread;
-       gTSSs[cpu].RSP0 = nextthread->KernelStack-4;
+       gTSSs[cpu].RSP0 = nextthread->KernelStack-sizeof(void*);
        __asm__ __volatile__ ("mov %0, %%db0" : : "r" (nextthread));
 
        if( curthread )

UCC git Repository :: git.ucc.asn.au