Kernel/x86_64 - Fixed not resetting IF after SYSCALL entry
authorJohn Hodge <[email protected]>
Sun, 9 Oct 2011 04:20:24 +0000 (12:20 +0800)
committerJohn Hodge <[email protected]>
Sun, 9 Oct 2011 04:20:24 +0000 (12:20 +0800)
Kernel/arch/x86_64/desctab.asm
Kernel/arch/x86_64/proc.c

index 2d96180..8ee4352 100644 (file)
@@ -386,6 +386,8 @@ SyscallStub:
        push rcx        ; RIP
        push r11        ; RFLAGS
 
+       sti     ; Start interrupts again
+
        ; RDI
        ; RSI
        ; RDX
index 2d07e1a..de25c45 100644 (file)
@@ -646,24 +646,12 @@ void Proc_StartProcess(Uint16 SS, Uint Stack, Uint Flags, Uint16 CS, Uint IP)
        else
        {
                // 64-bit return
-               #if 1
                __asm__ __volatile__ (
                        "mov %0, %%rsp;\n\t"    // Set stack pointer
                        "mov %2, %%r11;\n\t"    // Set RFLAGS
                        "sysretq;\n\t"
                        : : "r" (Stack), "c" (IP), "r" (Flags)
                        );
-               #else
-               __asm__ __volatile__ (
-                       "push $0x23;\n\t"       // SS
-                       "push %0;\n\t"  // RSP
-                       "push %2;\n\t"  // Flags
-                       "push $0x2B;\n\t"       // CS
-                       "push %1;\n\t"  // IP
-                       "iretq"
-                       : : "r" (Stack), "r" (IP), "r" (Flags)
-                       );
-               #endif
        }
        for(;;);
 }

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