Module Name:    src
Committed By:   chs
Date:           Mon Jan  7 17:03:06 UTC 2013

Modified Files:
        src/sys/arch/amd64/include: segments.h

Log Message:
rearrange the LDT entries so that (32-bit) COMPAT_10 binaries work again.
in long mode, call gates use two slots, so the first entry (a call gate)
would overlap the second one (the 32-bit user code descriptor).


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/amd64/include/segments.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/include/segments.h
diff -u src/sys/arch/amd64/include/segments.h:1.23 src/sys/arch/amd64/include/segments.h:1.24
--- src/sys/arch/amd64/include/segments.h:1.23	Sat Jun 16 20:47:04 2012
+++ src/sys/arch/amd64/include/segments.h	Mon Jan  7 17:03:06 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: segments.h,v 1.23 2012/06/16 20:47:04 dsl Exp $	*/
+/*	$NetBSD: segments.h,v 1.24 2013/01/07 17:03:06 chs Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -374,12 +374,15 @@ void cpu_fsgs_reload(struct lwp *, int, 
  * Strange order because of syscall/sysret insns
  */
 #define	LSYS5CALLS_SEL	0	/* iBCS system call gate */
-#define LUCODE32_SEL	8	/* 32 bit user code descriptor */
-#define	LUDATA_SEL	16	/* User data descriptor */
-#define	LUCODE_SEL	24	/* User code descriptor */
+/*			8	   second half */
 #define	LSOL26CALLS_SEL	32	/* Solaris 2.6 system call gate */
-#define LUDATA32_SEL	56	/* 32 bit user data descriptor (needed?)*/
+/*			40	   second half */
+#define LUCODE32_SEL	48	/* 32 bit user code descriptor */
+#define	LUDATA_SEL	56	/* User data descriptor */
+#define	LUCODE_SEL	64	/* User code descriptor */
+#define LUDATA32_SEL	72	/* 32 bit user data descriptor (needed?)*/
 #define	LBSDICALLS_SEL	128	/* BSDI system call gate */
+/*			136	   second half */
 
 #define LDT_SIZE	144
 

Reply via email to