Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/include rearrange the LDT entries so that (32...



details:   https://anonhg.NetBSD.org/src/rev/71980160c109
branches:  trunk
changeset: 783754:71980160c109
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Jan 07 17:03:06 2013 +0000

description:
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).

diffstat:

 sys/arch/amd64/include/segments.h |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (29 lines):

diff -r 152aa746aa83 -r 71980160c109 sys/arch/amd64/include/segments.h
--- a/sys/arch/amd64/include/segments.h Mon Jan 07 16:58:08 2013 +0000
+++ b/sys/arch/amd64/include/segments.h Mon Jan 07 17:03:06 2013 +0000
@@ -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 @@
  * 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
 



Home | Main Index | Thread Index | Old Index