Skip to contentSkip to conversation

x86/boot: Use mnemonics rather than magic numbers

PATCH New Andrew Cooper 1 participant 1 message Oct 13, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/boot: Use mnemonics rather than magic numbers

---
CC: Jan Beulich <[email protected]>

---
 xen/arch/x86/boot/trampoline.S |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
xen/arch/x86/boot/trampoline.S +2 -1
index ccb40fb..3452979 100644
@@ -98,7 +98,8 @@ trampoline_protmode_entry:
 1:      wrmsr
 .Lskip_efer:
 
-        mov     $0x80050033,%eax /* hi-to-lo: PG,AM,WP,NE,ET,MP,PE */
+        mov     $(X86_CR0_PG | X86_CR0_AM | X86_CR0_WP | X86_CR0_NE |\
+                  X86_CR0_ET | X86_CR0_MP | X86_CR0_PE), %eax
         mov     %eax,%cr0
         jmp     1f
 1:
Signature · 1 line
1.7.10.4