]> err.no Git - linux-2.6/blobdiff - arch/x86/kernel/head_32.S
Merge branch 'linus' into tmp.x86.mpparse.new
[linux-2.6] / arch / x86 / kernel / head_32.S
index 74d87ea85b5cdfa360a10a5b79ba33a8e38a60e5..b98b338aae1a536639186611dc915ce82ee02366 100644 (file)
@@ -1,5 +1,4 @@
 /*
- *  linux/arch/i386/kernel/head.S -- the 32-bit startup code.
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
  *
@@ -190,11 +189,12 @@ default_entry:
         * this stage.
         */
 
-#define KPMDS ((0x100000000-__PAGE_OFFSET) >> 30) /* Number of kernel PMDs */
+#define KPMDS (((-__PAGE_OFFSET) >> 30) & 3) /* Number of kernel PMDs */
 
        xorl %ebx,%ebx                          /* %ebx is kept at zero */
 
        movl $pa(pg0), %edi
+       movl %edi, pa(init_pg_tables_start)
        movl $pa(swapper_pg_pmd), %edx
        movl $PTE_ATTR, %eax
 10:
@@ -220,6 +220,8 @@ default_entry:
        jb 10b
 1:
        movl %edi,pa(init_pg_tables_end)
+       shrl $12, %eax
+       movl %eax, pa(max_pfn_mapped)
 
        /* Do early initialization of the fixmap area */
        movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
@@ -229,6 +231,7 @@ default_entry:
 page_pde_offset = (__PAGE_OFFSET >> 20);
 
        movl $pa(pg0), %edi
+       movl %edi, pa(init_pg_tables_start)
        movl $pa(swapper_pg_dir), %edx
        movl $PTE_ATTR, %eax
 10:
@@ -250,6 +253,8 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
        cmpl %ebp,%eax
        jb 10b
        movl %edi,pa(init_pg_tables_end)
+       shrl $12, %eax
+       movl %eax, pa(max_pfn_mapped)
 
        /* Do early initialization of the fixmap area */
        movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
@@ -450,7 +455,7 @@ is386:      movl $2,%ecx            # set MP
        jmp initialize_secondary # all other CPUs call initialize_secondary
 1:
 #endif /* CONFIG_SMP */
-       jmp start_kernel
+       jmp i386_start_kernel
 
 /*
  * We depend on ET to be correct. This checks for 287/387.
@@ -657,15 +662,16 @@ int_msg:
        .asciz "Unknown interrupt or fault at EIP %p %p %p\n"
 
 fault_msg:
-       .asciz                                                          \
-/* fault info: */      "BUG: Int %d: CR2 %p\n"                         \
-/* pusha regs: */      "     EDI %p  ESI %p  EBP %p  ESP %p\n"         \
-                       "     EBX %p  EDX %p  ECX %p  EAX %p\n"         \
-/* fault frame: */     "     err %p  EIP %p   CS %p  flg %p\n"         \
-                                                                       \
-                       "Stack: %p %p %p %p %p %p %p %p\n"              \
-                       "       %p %p %p %p %p %p %p %p\n"              \
-                       "       %p %p %p %p %p %p %p %p\n"
+/* fault info: */
+       .ascii "BUG: Int %d: CR2 %p\n"
+/* pusha regs: */
+       .ascii "     EDI %p  ESI %p  EBP %p  ESP %p\n"
+       .ascii "     EBX %p  EDX %p  ECX %p  EAX %p\n"
+/* fault frame: */
+       .ascii "     err %p  EIP %p   CS %p  flg %p\n"
+       .ascii "Stack: %p %p %p %p %p %p %p %p\n"
+       .ascii "       %p %p %p %p %p %p %p %p\n"
+       .asciz "       %p %p %p %p %p %p %p %p\n"
 
 #include "../../x86/xen/xen-head.S"