From 65882ba5c51e36bb639a41e0be5b1d4822a3995f Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Wed, 18 Apr 2007 20:53:10 -0500 Subject: [PATCH] Return to the int98 vsyscall code when returning from int99. --- kernel/arch/x86/entry.S | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/kernel/arch/x86/entry.S b/kernel/arch/x86/entry.S index 3483893..098d6d7 100644 --- a/kernel/arch/x86/entry.S +++ b/kernel/arch/x86/entry.S @@ -14,6 +14,8 @@ #include +#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 -- 2.39.2