summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>2009-05-19 01:31:16 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>2009-05-19 01:31:16 +0000
commit9f0670f6dfccef12c6e39c1f779916eaf95a5d06 (patch)
treeab57dbc18f51e21c6b06d6757a8fe93436ea7b08
parentca92feec256873923e56c63030f7b55779e8de63 (diff)
Seperate out BSDI and SYSV syscall gate setup, so if we don't
have one or the other option, we won't get said kernel entry point. Ok oga@
-rw-r--r--sys/arch/i386/i386/machdep.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index 576ef356738..3c39b2bb926 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.448 2009/03/10 15:03:17 oga Exp $ */
+/* $OpenBSD: machdep.c,v 1.449 2009/05/19 01:31:15 weingart Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -2893,9 +2893,14 @@ init386(paddr_t first_avail)
sizeof(struct cpu_info)-1, SDT_MEMRWA, SEL_KPL, 0, 0);
/* make ldt gates and memory segments */
+#ifdef COMPAT_IBCS2
setgate(&ldt[LSYS5CALLS_SEL].gd, &IDTVEC(osyscall), 1, SDT_SYS386CGT,
SEL_UPL, GCODE_SEL);
- ldt[LBSDICALLS_SEL] = ldt[LSYS5CALLS_SEL];
+#endif
+#ifdef COMPAT_BSDOS
+ setgate(&ldt[LBSDICALLS_SEL].gd, &IDTVEC(osyscall), 1, SDT_SYS386CGT,
+ SEL_UPL, GCODE_SEL);
+#endif
/* exceptions */
setgate(&idt[ 0], &IDTVEC(div), 0, SDT_SYS386TGT, SEL_KPL, GCODE_SEL);