From: John Hodge Date: Sun, 9 Oct 2011 04:20:24 +0000 (+0800) Subject: Kernel/x86_64 - Fixed not resetting IF after SYSCALL entry X-Git-Tag: rel0.11~4 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=b3445a17bf2340715d64d205e193807c0153c835;p=tpg%2Facess2.git Kernel/x86_64 - Fixed not resetting IF after SYSCALL entry --- diff --git a/Kernel/arch/x86_64/desctab.asm b/Kernel/arch/x86_64/desctab.asm index 2d96180d..8ee4352e 100644 --- a/Kernel/arch/x86_64/desctab.asm +++ b/Kernel/arch/x86_64/desctab.asm @@ -386,6 +386,8 @@ SyscallStub: push rcx ; RIP push r11 ; RFLAGS + sti ; Start interrupts again + ; RDI ; RSI ; RDX diff --git a/Kernel/arch/x86_64/proc.c b/Kernel/arch/x86_64/proc.c index 2d07e1ac..de25c450 100644 --- a/Kernel/arch/x86_64/proc.c +++ b/Kernel/arch/x86_64/proc.c @@ -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(;;); }