diff options
author | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-05-06 04:20:41 +0000 |
---|---|---|
committer | Philip Guenthe <guenther@cvs.openbsd.org> | 2012-05-06 04:20:41 +0000 |
commit | b291180aed430a763ea67915de69e61a659ea4ac (patch) | |
tree | ab44ada910398c805f1d95158b79fac4045a7d73 /sys/arch/amd64 | |
parent | da9b777fe35bfcbc4be27ad117391977c0e98a31 (diff) |
Garbage collect the old int$80 kernel entry point: the last use of
it by the not-normally-used sigreturn() stub in libc was changed to
use 'syscall' instruction in 5.0
ok mikeb@ jsg@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r-- | sys/arch/amd64/amd64/locore.S | 27 | ||||
-rw-r--r-- | sys/arch/amd64/amd64/machdep.c | 7 |
2 files changed, 3 insertions, 31 deletions
diff --git a/sys/arch/amd64/amd64/locore.S b/sys/arch/amd64/amd64/locore.S index 19e14d734ee..b6a0059adbc 100644 --- a/sys/arch/amd64/amd64/locore.S +++ b/sys/arch/amd64/amd64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.51 2011/12/26 23:07:04 haesbaert Exp $ */ +/* $OpenBSD: locore.S,v 1.52 2012/05/06 04:20:40 guenther Exp $ */ /* $NetBSD: locore.S,v 1.13 2004/03/25 18:33:17 drochner Exp $ */ /* @@ -993,31 +993,6 @@ NENTRY(child_trampoline) /* - * Trap gate entry for old int $80 syscall (used to be used by sigreturn) - */ -IDTVEC(osyscall) - pushq $2 # size of instruction for restart - pushq $T_ASTFLT # trap # for doing ASTs - INTRENTRY - sti - movq CPUVAR(CURPROC),%rdx - movq %rsp,P_MD_REGS(%rdx) # save pointer to frame - movq %rsp,%rdi - call _C_LABEL(syscall) -_C_LABEL(osyscall_return): -2: /* Check for ASTs on exit to user mode. */ - cli - CHECK_ASTPENDING(%r11) - je 1f - /* Always returning to user mode here. */ - CLEAR_ASTPENDING(%r11) - sti - /* Pushed T_ASTFLT into tf_trapno on entry. */ - movq %rsp,%rdi - call _C_LABEL(trap) - jmp 2b - -/* * Return via iretq, for real interrupts and signal returns */ iret_return: diff --git a/sys/arch/amd64/amd64/machdep.c b/sys/arch/amd64/amd64/machdep.c index 0951d7865d0..25aa5bb7199 100644 --- a/sys/arch/amd64/amd64/machdep.c +++ b/sys/arch/amd64/amd64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.152 2012/01/13 12:55:52 jsing Exp $ */ +/* $OpenBSD: machdep.c,v 1.153 2012/05/06 04:20:40 guenther Exp $ */ /* $NetBSD: machdep.c,v 1.3 2003/05/07 22:58:18 fvdl Exp $ */ /*- @@ -1199,7 +1199,6 @@ map_tramps(void) { #define IDTVEC(name) __CONCAT(X, name) typedef void (vector)(void); -extern vector IDTVEC(osyscall); extern vector *IDTVEC(exceptions)[]; void @@ -1524,9 +1523,7 @@ init_x86_64(paddr_t first_avail) idt_allocmap[x] = 1; } - /* new-style interrupt gate for syscalls */ - setgate(&idt[128], &IDTVEC(osyscall), 0, SDT_SYS386IGT, SEL_UPL, - GSEL(GCODE_SEL, SEL_KPL)); + /* 128 was the old interrupt gate for syscalls; remove in 2013 */ idt_allocmap[128] = 1; setregion(®ion, gdtstore, GDT_SIZE - 1); |