[ros-diffs] [tkreuzer] 37019: On x64 the 64 bit ring3 teb (gs) shares the generic 64 bit data selector, while the 32 bit teb (fs) has it's own selector.

tkreuzer at svn.reactos.org tkreuzer at svn.reactos.org
Mon Oct 27 14:00:44 CET 2008


Author: tkreuzer
Date: Mon Oct 27 08:00:44 2008
New Revision: 37019

URL: http://svn.reactos.org/svn/reactos?rev=37019&view=rev
Log:
On x64 the 64 bit ring3 teb (gs) shares the generic 64 bit data selector, while the 32 bit teb (fs) has it's own selector.

Modified:
    branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c

Modified: branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c
URL: http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c?rev=37019&r1=37018&r2=37019&view=diff
==============================================================================
--- branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/dll/win32/kernel32/misc/utils.c [iso-8859-1] Mon Oct 27 08:00:44 2008
@@ -386,12 +386,12 @@
     /* The other registers are undefined */
 
     /* Setup the Segments */
-    Context->SegFs = KGDT_64_R3_TEB | RPL_MASK;
+    Context->SegGs = KGDT_64_DATA | RPL_MASK;
     Context->SegEs = KGDT_64_DATA | RPL_MASK;
     Context->SegDs = KGDT_64_DATA | RPL_MASK;
     Context->SegCs = KGDT_64_R3_CODE | RPL_MASK;
     Context->SegSs = KGDT_64_DATA | RPL_MASK;
-    Context->SegGs = 0;
+    Context->SegFs = KGDT_32_R3_TEB;
 
     /* Set the EFLAGS */
     Context->EFlags = 0x3000; /* IOPL 3 */



More information about the Ros-diffs mailing list