summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);