Skip to content

Commit

Permalink
x86: compressed/head_64.S cleanup - use predefined flags from process…
Browse files Browse the repository at this point in the history
…or-flags.h

We should better use already defined flags from processor-flags.h instead
of defining own ones

[>>> object code check >>>]

original
md5sum: 129f24be6df396fb7d8bf998c01fc716  arch/x86/boot/compressed/head_64.o
   text    data     bss     dec     hex filename
    705      48   45056   45809    b2f1 arch/x86/boot/compressed/head_64.o

patched
md5sum: 129f24be6df396fb7d8bf998c01fc716  arch/x86/boot/compressed/head_64-new.o
   text    data     bss     dec     hex filename
    705      48   45056   45809    b2f1 arch/x86/boot/compressed/head_64-new.o

[<<< object code check <<<]

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Thomas Gleixner committed May 25, 2008
1 parent 369101d commit e83e31f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/boot/compressed/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <asm/page.h>
#include <asm/boot.h>
#include <asm/msr.h>
#include <asm/processor-flags.h>
#include <asm/asm-offsets.h>

.section ".text.head"
Expand Down Expand Up @@ -109,7 +110,7 @@ startup_32:

/* Enable PAE mode */
xorl %eax, %eax
orl $(1 << 5), %eax
orl $(X86_CR4_PAE), %eax
movl %eax, %cr4

/*
Expand Down Expand Up @@ -170,7 +171,7 @@ startup_32:
pushl %eax

/* Enter paged protected Mode, activating Long Mode */
movl $0x80000001, %eax /* Enable Paging and Protected mode */
movl $(X86_CR0_PG | X86_CR0_PE), %eax /* Enable Paging and Protected mode */
movl %eax, %cr0

/* Jump from 32bit compatibility mode into 64bit mode. */
Expand Down

0 comments on commit e83e31f

Please sign in to comment.