Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/amd64/amd64/locore.S,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/amd64/amd64/locore.S,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.76.8.2 retrieving revision 1.77 diff -u -p -r1.76.8.2 -r1.77 --- src/sys/arch/amd64/amd64/locore.S 2017/07/20 01:43:10 1.76.8.2 +++ src/sys/arch/amd64/amd64/locore.S 2014/08/17 21:17:43 1.77 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.76.8.2 2017/07/20 01:43:10 snj Exp $ */ +/* $NetBSD: locore.S,v 1.77 2014/08/17 21:17:43 joerg Exp $ */ /* * Copyright-o-rama! @@ -520,7 +520,7 @@ ENTRY(start) /* Find end of kernel image. */ movl $RELOC(end),%edi -#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(SYMTAB_SPACE) +#if (NKSYMS || defined(DDB) || defined(MODULAR)) && !defined(COPY_SYMTAB) /* Save the symbols (if loaded). */ movl RELOC(esym),%eax testl %eax,%eax @@ -1287,6 +1287,27 @@ NENTRY(lwp_trampoline) END(lwp_trampoline) /* + * oosyscall() + * + * Old call gate entry for syscall. only needed if we're + * going to support running old i386 NetBSD 1.0 or ibcs2 binaries, etc, + * on NetBSD/amd64. + * The 64bit call gate can't request that arguments be copied from the + * user stack (which the i386 code uses to get a gap for the flags). + * push/pop are :: cycles. + */ +IDTVEC(oosyscall) + /* Set rflags in trap frame. */ + pushq (%rsp) # move user's %eip + pushq 16(%rsp) # and %cs + popq 8(%rsp) + pushfq + popq 16(%rsp) + pushq $7 # size of instruction for restart + jmp osyscall1 +IDTVEC_END(oosyscall) + +/* * osyscall() * * Trap gate entry for int $80 syscall, also used by sigreturn. @@ -1298,6 +1319,7 @@ IDTVEC(osyscall) addq $0x10,%rsp #endif pushq $2 # size of instruction for restart +osyscall1: pushq $T_ASTFLT # trap # for doing ASTs INTRENTRY STI(si)