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 Move %ds and %es into the GDT on 64bit ...



details:   https://anonhg.NetBSD.org/src/rev/8dc452e63b12
branches:  trunk
changeset: 827156:8dc452e63b12
user:      maxv <maxv%NetBSD.org@localhost>
date:      Tue Oct 17 07:48:10 2017 +0000

description:
Move %ds and %es into the GDT on 64bit LWPs.

diffstat:

 sys/arch/amd64/amd64/locore.S  |  4 ++--
 sys/arch/amd64/amd64/machdep.c |  8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (47 lines):

diff -r 78b105e4b895 -r 8dc452e63b12 sys/arch/amd64/amd64/locore.S
--- a/sys/arch/amd64/amd64/locore.S     Tue Oct 17 07:33:44 2017 +0000
+++ b/sys/arch/amd64/amd64/locore.S     Tue Oct 17 07:48:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.132 2017/10/17 07:33:44 maxv Exp $        */
+/*     $NetBSD: locore.S,v 1.133 2017/10/17 07:48:10 maxv Exp $        */
 
 /*
  * Copyright-o-rama!
@@ -1284,7 +1284,7 @@
        movw    %es,TF_ES(%rsp)
        movw    %fs,TF_FS(%rsp)
        movw    %gs,TF_GS(%rsp)
-       movw    $(LSEL(LUDATA_SEL, SEL_UPL)),TF_DS(%rsp)
+       movw    $(GSEL(GUDATA_SEL, SEL_UPL)),TF_DS(%rsp)
        STI(si)
 
 do_syscall:
diff -r 78b105e4b895 -r 8dc452e63b12 sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Tue Oct 17 07:33:44 2017 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Tue Oct 17 07:48:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.267 2017/10/15 13:34:24 maxv Exp $       */
+/*     $NetBSD: machdep.c,v 1.268 2017/10/17 07:48:10 maxv Exp $       */
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.267 2017/10/15 13:34:24 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.268 2017/10/17 07:48:10 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1331,8 +1331,8 @@
        l->l_md.md_flags = MDL_IRET;
 
        tf = l->l_md.md_regs;
-       tf->tf_ds = LSEL(LUDATA_SEL, SEL_UPL);
-       tf->tf_es = LSEL(LUDATA_SEL, SEL_UPL);
+       tf->tf_ds = GSEL(GUDATA_SEL, SEL_UPL);
+       tf->tf_es = GSEL(GUDATA_SEL, SEL_UPL);
        cpu_segregs64_zero(l);
        tf->tf_rdi = 0;
        tf->tf_rsi = 0;



Home | Main Index | Thread Index | Old Index