aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/realmode/rm/reboot.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/realmode/rm/reboot.S b/arch/x86/realmode/rm/reboot.S
index 6bf8feac5557..f932ea61d1c8 100644
--- a/arch/x86/realmode/rm/reboot.S
+++ b/arch/x86/realmode/rm/reboot.S
@@ -22,14 +22,18 @@
22ENTRY(machine_real_restart_asm) 22ENTRY(machine_real_restart_asm)
23 23
24#ifdef CONFIG_X86_64 24#ifdef CONFIG_X86_64
25 /* Switch to trampoline GDT as it is guaranteed < 4 GiB */
26 movl $__KERNEL_DS, %eax
27 movl %eax, %ds
28 lgdtl pa_tr_gdt
25 29
26 /* Disable paging to drop us out of long mode */ 30 /* Disable paging to drop us out of long mode */
27 movl %cr0, %eax 31 movl %cr0, %eax
28 andl $~X86_CR0_PG, %eax 32 andl $~X86_CR0_PG, %eax
29 movl %eax, %cr0 33 movl %eax, %cr0
30 jmp 1f /* "A branch" may be needed here, assume near is OK */ 34 ljmpl $__KERNEL32_CS, $pa_machine_real_restart_paging_off
31 35
321: 36GLOBAL(machine_real_restart_paging_off)
33 xorl %eax, %eax 37 xorl %eax, %eax
34 xorl %edx, %edx 38 xorl %edx, %edx
35 movl $MSR_EFER, %ecx 39 movl $MSR_EFER, %ecx