aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/realmode/rm/wakeup_asm.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/realmode/rm/wakeup_asm.S')
-rw-r--r--arch/x86/realmode/rm/wakeup_asm.S15
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/x86/realmode/rm/wakeup_asm.S b/arch/x86/realmode/rm/wakeup_asm.S
index e56479e5805..9e7e14797a7 100644
--- a/arch/x86/realmode/rm/wakeup_asm.S
+++ b/arch/x86/realmode/rm/wakeup_asm.S
@@ -74,18 +74,9 @@ ENTRY(wakeup_start)
74 74
75 lidtl wakeup_idt 75 lidtl wakeup_idt
76 76
77 /* Clear the EFLAGS but remember if we have EFLAGS.ID */ 77 /* Clear the EFLAGS */
78 movl $X86_EFLAGS_ID, %ecx
79 pushl %ecx
80 popfl
81 pushfl
82 popl %edi
83 pushl $0 78 pushl $0
84 popfl 79 popfl
85 pushfl
86 popl %edx
87 xorl %edx, %edi
88 andl %ecx, %edi /* %edi is zero iff CPUID & %cr4 are missing */
89 80
90 /* Check header signature... */ 81 /* Check header signature... */
91 movl signature, %eax 82 movl signature, %eax
@@ -120,12 +111,12 @@ ENTRY(wakeup_start)
120 movl %eax, %cr3 111 movl %eax, %cr3
121 112
122 btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi 113 btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi
123 jz 1f 114 jnc 1f
124 movl pmode_cr4, %eax 115 movl pmode_cr4, %eax
125 movl %eax, %cr4 116 movl %eax, %cr4
1261: 1171:
127 btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi 118 btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi
128 jz 1f 119 jnc 1f
129 movl pmode_efer, %eax 120 movl pmode_efer, %eax
130 movl pmode_efer + 4, %edx 121 movl pmode_efer + 4, %edx
131 movl $MSR_EFER, %ecx 122 movl $MSR_EFER, %ecx