Source-Changes-HG archive

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

[src/cherry-xenmp]: src/sys/arch/i386/i386 Update cpu local GDT entries for T...



details:   https://anonhg.NetBSD.org/src/rev/14788f3d5a88
branches:  cherry-xenmp
changeset: 765626:14788f3d5a88
user:      cherry <cherry%NetBSD.org@localhost>
date:      Sat Aug 06 21:06:34 2011 +0000

description:
Update cpu local GDT entries for TLS registers %gs and %fs

diffstat:

 sys/arch/i386/i386/machdep.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r 176407663f03 -r 14788f3d5a88 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c      Sat Aug 06 14:05:35 2011 +0000
+++ b/sys/arch/i386/i386/machdep.c      Sat Aug 06 21:06:34 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.702.2.2 2011/07/31 20:49:10 cherry Exp $ */
+/*     $NetBSD: machdep.c,v 1.702.2.3 2011/08/06 21:06:34 cherry Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.702.2.2 2011/07/31 20:49:10 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.702.2.3 2011/08/06 21:06:34 cherry Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_ibcs2.h"
@@ -560,6 +560,12 @@
 
        HYPERVISOR_stack_switch(GSEL(GDATA_SEL, SEL_KPL), pcb->pcb_esp0);
 
+       /* Update TLS segment pointers */
+       update_descriptor(&ci->ci_gdt[GUFS_SEL],
+                         (union descriptor *) &pcb->pcb_fsd);
+       update_descriptor(&ci->ci_gdt[GUGS_SEL], 
+                         (union descriptor *) &pcb->pcb_gsd);
+
        physop.cmd = PHYSDEVOP_SET_IOPL;
        physop.u.set_iopl.iopl = pcb->pcb_iopl;
        HYPERVISOR_physdev_op(&physop);



Home | Main Index | Thread Index | Old Index