diff --git a/arch/x86/core/crt0.S b/arch/x86/core/crt0.S index 696ac558c49..038a10adbc1 100644 --- a/arch/x86/core/crt0.S +++ b/arch/x86/core/crt0.S @@ -368,9 +368,9 @@ __csSet: orl $0x800, %eax wrmsr #endif - /* set CR0.PG bit (31st bit in CR0)*/ + /* Enable paging (CR0.PG, bit 31) / write protect (CR0.WP, bit 16) */ movl %cr0, %eax - orl $CR0_PAGING_ENABLE, %eax + orl $CR0_PG_WP_ENABLE, %eax movl %eax, %cr0 #endif /* CONFIG_X86_MMU */ diff --git a/arch/x86/include/kernel_arch_data.h b/arch/x86/include/kernel_arch_data.h index 0834b525a65..d91b109d0de 100644 --- a/arch/x86/include/kernel_arch_data.h +++ b/arch/x86/include/kernel_arch_data.h @@ -386,7 +386,7 @@ #define EFLAGS_MASK 0x00003200 /* Enable paging and write protection */ -#define CR0_PAGING_ENABLE 0x80010000 +#define CR0_PG_WP_ENABLE 0x80010000 /* Clear the 5th bit in CR4 */ #define CR4_PAE_DISABLE 0xFFFFFFEF /* Set the 5th bit in CR4 */