Message ID | 6aada664ff70ec913faae672bb3c16db14b36049.1668958803.git.baskov@ispras.ru (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | x86_64: Improvements at compressed kernel stage | expand |
diff --git a/arch/x86/boot/compressed/head_64.S b/arch/x86/boot/compressed/head_64.S index d33f060900d2..2a4372b84fc8 100644 --- a/arch/x86/boot/compressed/head_64.S +++ b/arch/x86/boot/compressed/head_64.S @@ -684,9 +684,8 @@ SYM_CODE_START(trampoline_32bit_src) pushl $__KERNEL_CS pushl %eax - /* Enable paging again. */ - movl %cr0, %eax - btsl $X86_CR0_PG_BIT, %eax + /* Enable paging and set CR0 to known state (this also sets WP flag) */ + movl $CR0_STATE, %eax movl %eax, %cr0 lret