Pull sony into release branch
[pandora-kernel.git] / arch / x86_64 / kernel / head.S
index 1e6f808..598a4d0 100644 (file)
@@ -163,6 +163,20 @@ startup_64:
         */
        lgdt    cpu_gdt_descr
 
+       /* set up data segments. actually 0 would do too */
+       movl $__KERNEL_DS,%eax
+       movl %eax,%ds
+       movl %eax,%ss
+       movl %eax,%es
+
+       /*
+        * We don't really need to load %fs or %gs, but load them anyway
+        * to kill any stale realmode selectors.  This allows execution
+        * under VT hardware.
+        */
+       movl %eax,%fs
+       movl %eax,%gs
+
        /* 
         * Setup up a dummy PDA. this is just for some early bootup code
         * that does in_interrupt() 
@@ -173,12 +187,6 @@ startup_64:
        shrq    $32,%rdx
        wrmsr   
 
-       /* set up data segments. actually 0 would do too */
-       movl $__KERNEL_DS,%eax
-       movl %eax,%ds   
-       movl %eax,%ss
-       movl %eax,%es
-                       
        /* esi is pointer to real mode structure with interesting info.
           pass it to C */
        movl    %esi, %edi