Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 initialize the old "int 0x80" syscall o...
details: https://anonhg.NetBSD.org/src/rev/659ab3d94340
branches: trunk
changeset: 559778:659ab3d94340
user: drochner <drochner%NetBSD.org@localhost>
date: Tue Mar 23 19:35:16 2004 +0000
description:
initialize the old "int 0x80" syscall only for COMPAT_16/NETBSD32,
and the very old callgate for COMPAT_10/IBCS2
diffstat:
sys/arch/amd64/amd64/machdep.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (64 lines):
diff -r 72660604f26c -r 659ab3d94340 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Tue Mar 23 19:09:01 2004 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Tue Mar 23 19:35:16 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.21 2004/03/01 12:06:02 drochner Exp $ */
+/* $NetBSD: machdep.c,v 1.22 2004/03/23 19:35:16 drochner Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -72,12 +72,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.21 2004/03/01 12:06:02 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.22 2004/03/23 19:35:16 drochner Exp $");
#include "opt_user_ldt.h"
#include "opt_ddb.h"
#include "opt_kgdb.h"
#include "opt_compat_netbsd.h"
+#include "opt_compat_netbsd32.h"
+#include "opt_compat_ibcs2.h"
#include "opt_cpureset_delay.h"
#include "opt_multiprocessor.h"
#include "opt_mtrr.h"
@@ -1029,8 +1031,12 @@
typedef void (vector) __P((void));
extern vector IDTVEC(syscall);
extern vector IDTVEC(syscall32);
+#if defined(COMPAT_16) || defined(COMPAT_NETBSD32)
extern vector IDTVEC(osyscall);
+#endif
+#if defined(COMPAT_10) || defined(COMPAT_IBCS2)
extern vector IDTVEC(oosyscall);
+#endif
extern vector *IDTVEC(exceptions)[];
#define KBTOB(x) ((size_t)(x) * 1024UL)
@@ -1437,10 +1443,11 @@
x86_btop(VM_MAXUSER_ADDRESS) - 1, SDT_MEMRWA, SEL_UPL, 1, 0, 1);
/* make ldt gates and memory segments */
+#if defined(COMPAT_10) || defined(COMPAT_IBCS2)
setgate((struct gate_descriptor *)(ldtstore + LSYS5CALLS_SEL),
&IDTVEC(oosyscall), 0, SDT_SYS386CGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
-
+#endif
*(struct mem_segment_descriptor *)(ldtstore + LUCODE_SEL) =
*GDT_ADDR_MEM(gdtstore, GUCODE_SEL);
*(struct mem_segment_descriptor *)(ldtstore + LUDATA_SEL) =
@@ -1485,10 +1492,12 @@
idt_allocmap[x] = 1;
}
+#if defined(COMPAT_16) || defined(COMPAT_NETBSD32)
/* new-style interrupt gate for syscalls */
setgate(&idt[128], &IDTVEC(osyscall), 0, SDT_SYS386IGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
idt_allocmap[128] = 1;
+#endif
setregion(®ion, gdtstore, DYNSEL_START - 1);
lgdt(®ion);
Home |
Main Index |
Thread Index |
Old Index