|
@@ -163,6 +163,20 @@ startup_64:
|
|
*/
|
|
*/
|
|
lgdt cpu_gdt_descr
|
|
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
|
|
* Setup up a dummy PDA. this is just for some early bootup code
|
|
* that does in_interrupt()
|
|
* that does in_interrupt()
|
|
@@ -173,12 +187,6 @@ startup_64:
|
|
shrq $32,%rdx
|
|
shrq $32,%rdx
|
|
wrmsr
|
|
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.
|
|
/* esi is pointer to real mode structure with interesting info.
|
|
pass it to C */
|
|
pass it to C */
|
|
movl %esi, %edi
|
|
movl %esi, %edi
|