Return to the int98 vsyscall code when returning from int99.
authorScott Wood <scott@buserror.net>
Thu, 19 Apr 2007 01:53:10 +0000 (20:53 -0500)
committerScott Wood <scott@buserror.net>
Thu, 19 Apr 2007 01:53:10 +0000 (20:53 -0500)
kernel/arch/x86/entry.S

index 3483893d93f4c9c642d7244bc493eff25cff6cf2..098d6d71dfe584bb7b1a612d11304cbe2f049fdf 100644 (file)
@@ -14,6 +14,8 @@
 
 #include <arch/addrs.h>
 
+#define ROSHARED_PTR(x) (x - x86_syscall_ptr + 0x7fff0000)
+
        .org 0
        .code32
        .global _start
@@ -306,7 +308,7 @@ x86_int99_entry:
        pushl   %esp
        call    x86_return_from_method
        addl    $4, %esp
-
+       
        exitkernel
        popl    %eax
        popl    %ecx
@@ -315,6 +317,7 @@ x86_int99_entry:
        xorl    %ebp, %ebp
        xorl    %esi, %esi
        xorl    %edi, %edi
+       movl    $ROSHARED_PTR(x86_shared_int98_ret), (%esp)
        iret
 
        .global x86_irq
@@ -385,18 +388,16 @@ x86_new_thread:
 
        .section ".roshared","x"
        
-       // The vsyscall table must be the first thing in roshared (at
-       // vaddr 0x7fff0000).
-
-#define PTR(x) (x - x86_syscall_ptr + 0x7fff0000)
+       // The vsyscall table must be the first thing in roshared 
+       // (at vaddr 0x7fff0000).
        
        .global x86_syscall_ptr
 x86_syscall_ptr:
-       .long   PTR(x86_shared_int98)
+       .long   ROSHARED_PTR(x86_shared_int98)
 
        .global x86_sysret_ptr
 x86_sysret_ptr:
-       .long   PTR(x86_shared_int99)
+       .long   ROSHARED_PTR(x86_shared_int99)
 
 x86_shared_int98:
        // FIXME: This must be unpreemptible by traps
@@ -407,6 +408,7 @@ x86_shared_int98:
        pushl   %esi
        pushl   %ebx
        int     $0x98
+x86_shared_int98_ret:
        popl    %ebx
        popl    %esi
        popl    %edi