]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/kernel/trampoline_64.S
x86: use _types.h headers in asm where available
[linux-2.6-omap-h63xx.git] / arch / x86 / kernel / trampoline_64.S
index 607983b0d27b9a5fd1b07d8e4beb41e7516417f1..cddfb8d386b927bce74e8b82e78a23aeaa83c04a 100644 (file)
@@ -10,9 +10,6 @@
  *     trampoline page to make our stack and everything else
  *     is a mystery.
  *
- *     In fact we don't actually need a stack so we don't
- *     set one up.
- *
  *     On entry to trampoline_data, the processor is in real mode
  *     with 16-bit addressing and 16-bit data.  CS has some value
  *     and IP is zero.  Thus, data addresses need to be absolute
  */
 
 #include <linux/linkage.h>
-#include <asm/pgtable.h>
-#include <asm/page.h>
+#include <asm/pgtable_types.h>
+#include <asm/page_types.h>
 #include <asm/msr.h>
 #include <asm/segment.h>
+#include <asm/processor-flags.h>
 
-.data
+.section .rodata, "a", @progbits
 
 .code16
 
 ENTRY(trampoline_data)
 r_base = .
        cli                     # We should be safe anyway
-       wbinvd  
+       wbinvd
        mov     %cs, %ax        # Code and data in the same place
        mov     %ax, %ds
        mov     %ax, %es
@@ -76,9 +74,8 @@ r_base = .
        lidtl   tidt - r_base   # load idt with 0, 0
        lgdtl   tgdt - r_base   # load gdt with whatever is appropriate
 
-       xor     %ax, %ax
-       inc     %ax             # protected mode (PE) bit
-       lmsw    %ax             # into protected mode
+       mov     $X86_CR0_PE, %ax        # protected mode (PE) bit
+       lmsw    %ax                     # into protected mode
 
        # flush prefetch and jump to startup_32
        ljmpl   *(startup_32_vector - r_base)
@@ -89,9 +86,8 @@ startup_32:
        movl    $__KERNEL_DS, %eax      # Initialize the %ds segment register
        movl    %eax, %ds
 
-       xorl    %eax, %eax
-       btsl    $5, %eax                # Enable PAE mode
-       movl    %eax, %cr4
+       movl    $X86_CR4_PAE, %eax
+       movl    %eax, %cr4              # Enable PAE mode
 
                                        # Setup trampoline 4 level pagetables
        leal    (trampoline_level4_pgt - r_base)(%esi), %eax
@@ -102,9 +98,9 @@ startup_32:
        xorl    %edx, %edx
        wrmsr
 
-       xorl    %eax, %eax
-       btsl    $31, %eax               # Enable paging and in turn activate Long Mode
-       btsl    $0, %eax                # Enable protected mode
+       # Enable paging and in turn activate Long Mode
+       # Enable protected mode
+       movl    $(X86_CR0_PG | X86_CR0_PE), %eax
        movl    %eax, %cr0
 
        /*