aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/relocate_kernel_32.S
diff options
context:
space:
mode:
authorgorcunov@gmail.com <gorcunov@gmail.com>2008-03-22 17:00:08 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:29 -0400
commitfd3af53122e616c0ddba44a3da6d1c1877f72d29 (patch)
tree34f1d9d653087ae76e528186c288dd5507f5afe0 /arch/x86/kernel/relocate_kernel_32.S
parenta7bba17bf09e1c5bdbdd6c0ab0c7833baedf4653 (diff)
x86: relocate_kernel - use predefined macroses for processor state
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/relocate_kernel_32.S')
-rw-r--r--arch/x86/kernel/relocate_kernel_32.S17
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/x86/kernel/relocate_kernel_32.S b/arch/x86/kernel/relocate_kernel_32.S
index ce12bb8678ad..a7ecc8e0bc67 100644
--- a/arch/x86/kernel/relocate_kernel_32.S
+++ b/arch/x86/kernel/relocate_kernel_32.S
@@ -9,6 +9,7 @@
9#include <linux/linkage.h> 9#include <linux/linkage.h>
10#include <asm/page.h> 10#include <asm/page.h>
11#include <asm/kexec.h> 11#include <asm/kexec.h>
12#include <asm/processor-flags.h>
12 13
13/* 14/*
14 * Must be relocatable PIC code callable as a C function 15 * Must be relocatable PIC code callable as a C function
@@ -167,16 +168,16 @@ identity_mapped:
167 pushl %edx 168 pushl %edx
168 169
169 /* Set cr0 to a known state: 170 /* Set cr0 to a known state:
170 * 31 0 == Paging disabled 171 * - Paging disabled
171 * 18 0 == Alignment check disabled 172 * - Alignment check disabled
172 * 16 0 == Write protect disabled 173 * - Write protect disabled
173 * 3 0 == No task switch 174 * - No task switch
174 * 2 0 == Don't do FP software emulation. 175 * - Don't do FP software emulation.
175 * 0 1 == Proctected mode enabled 176 * - Proctected mode enabled
176 */ 177 */
177 movl %cr0, %eax 178 movl %cr0, %eax
178 andl $~((1<<31)|(1<<18)|(1<<16)|(1<<3)|(1<<2)), %eax 179 andl $~(X86_CR0_PG | X86_CR0_AM | X86_CR0_WP | X86_CR0_TS | X86_CR0_EM), %eax
179 orl $(1<<0), %eax 180 orl $(X86_CR0_PE), %eax
180 movl %eax, %cr0 181 movl %eax, %cr0
181 182
182 /* clear cr4 if applicable */ 183 /* clear cr4 if applicable */