提交 02a7b425 编写于 作者: H H. Peter Anvin 提交者: Ingo Molnar

x86 setup: use X86_CR0_PE macro instead of hard-coded constant

To set CR0.PE, use the X86_CR0_PE macro defined in
<asm/processor-flags.h> instead of hardcoding it as a constant (1).
Signed-off-by: NH. Peter Anvin <hpa@zytor.com>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 88089519
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
*/ */
#include <asm/boot.h> #include <asm/boot.h>
#include <asm/processor-flags.h>
#include <asm/segment.h> #include <asm/segment.h>
.text .text
...@@ -39,7 +40,7 @@ protected_mode_jump: ...@@ -39,7 +40,7 @@ protected_mode_jump:
movw $__BOOT_TSS, %di movw $__BOOT_TSS, %di
movl %cr0, %edx movl %cr0, %edx
orb $1, %dl # Protected mode (PE) bit orb $X86_CR0_PE, %dl # Protected mode
movl %edx, %cr0 movl %edx, %cr0
jmp 1f # Short jump to serialize on 386/486 jmp 1f # Short jump to serialize on 386/486
1: 1:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册