#include <arch/addrs.h>
+#define ROSHARED_PTR(x) (x - x86_syscall_ptr + 0x7fff0000)
+
.org 0
.code32
.global _start
pushl %esp
call x86_return_from_method
addl $4, %esp
-
+
exitkernel
popl %eax
popl %ecx
xorl %ebp, %ebp
xorl %esi, %esi
xorl %edi, %edi
+ movl $ROSHARED_PTR(x86_shared_int98_ret), (%esp)
iret
.global x86_irq
.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
pushl %esi
pushl %ebx
int $0x98
+x86_shared_int98_ret:
popl %ebx
popl %esi
popl %edi