--- a/arch/x86/realmode/rm/wakeup_asm.S 2013-04-29 02:36:01.000000000 +0200 +++ b/arch/x86/realmode/rm/wakeup_asm.S 2013-05-01 11:42:07.359999895 +0200 @@ -93,8 +93,8 @@ /* Restore MISC_ENABLE before entering protected mode, in case BIOS decided to clear XD_DISABLE during S3. */ - movl pmode_behavior, %edi - btl $WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE, %edi + movl pmode_behavior, %eax + btl $WAKEUP_BEHAVIOR_RESTORE_MISC_ENABLE, %eax jnc 1f movl pmode_misc_en, %eax @@ -110,15 +110,15 @@ movl pmode_cr3, %eax movl %eax, %cr3 - btl $WAKEUP_BEHAVIOR_RESTORE_CR4, %edi - jnc 1f - movl pmode_cr4, %eax - movl %eax, %cr4 + movl pmode_cr4, %ecx + jecxz 1f + movl %ecx, %cr4 1: - btl $WAKEUP_BEHAVIOR_RESTORE_EFER, %edi - jnc 1f movl pmode_efer, %eax movl pmode_efer + 4, %edx + movl %eax, %ecx + orl %edx, %ecx + jz 1f movl $MSR_EFER, %ecx wrmsr 1: