Skip to content

Commit

Permalink
x86 setup: use X86_CR0_PE macro instead of hard-coded constant
Browse files Browse the repository at this point in the history
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: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
H. Peter Anvin authored and Ingo Molnar committed Jan 30, 2008
1 parent 8808951 commit 02a7b42
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/boot/pmjump.S
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include <asm/boot.h>
#include <asm/processor-flags.h>
#include <asm/segment.h>

.text
Expand All @@ -39,7 +40,7 @@ protected_mode_jump:
movw $__BOOT_TSS, %di

movl %cr0, %edx
orb $1, %dl # Protected mode (PE) bit
orb $X86_CR0_PE, %dl # Protected mode
movl %edx, %cr0
jmp 1f # Short jump to serialize on 386/486
1:
Expand Down

0 comments on commit 02a7b42

Please sign in to comment.