aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-05-29 15:56:36 -0400
committerIngo Molnar <mingo@elte.hu>2008-05-31 03:55:47 -0400
commitf0d43100f13be0fa5bf52741d7084bb27f00e621 (patch)
tree768e44de5624e110c358ed0b5f5e6582ee2bbbea /arch/x86/kernel
parent3945e2c9abf8e00c2edc4aa29215ddfad1cd8cf7 (diff)
x86: extend e820 early_res support 32bit -fix #3
introduce init_pg_table_start, so xen PV could specify the value. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/head32.c3
-rw-r--r--arch/x86/kernel/head_32.S2
-rw-r--r--arch/x86/kernel/setup_32.c7
3 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/kernel/head32.c b/arch/x86/kernel/head32.c
index c216d3c2a991..0b6cb9fba71e 100644
--- a/arch/x86/kernel/head32.c
+++ b/arch/x86/kernel/head32.c
@@ -76,7 +76,8 @@ void __init i386_start_kernel(void)
76 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); 76 reserve_early(ramdisk_image, ramdisk_end, "RAMDISK");
77 } 77 }
78#endif 78#endif
79 reserve_early(__pa_symbol(&_end), init_pg_tables_end, "INIT_PG_TABLE"); 79 reserve_early(init_pg_tables_start, init_pg_tables_end,
80 "INIT_PG_TABLE");
80 81
81 reserve_ebda_region(); 82 reserve_ebda_region();
82 83
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index b2cc73768a9d..bef4618feadb 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -194,6 +194,7 @@ default_entry:
194 xorl %ebx,%ebx /* %ebx is kept at zero */ 194 xorl %ebx,%ebx /* %ebx is kept at zero */
195 195
196 movl $pa(pg0), %edi 196 movl $pa(pg0), %edi
197 movl %edi, pa(init_pg_tables_start)
197 movl $pa(swapper_pg_pmd), %edx 198 movl $pa(swapper_pg_pmd), %edx
198 movl $PTE_ATTR, %eax 199 movl $PTE_ATTR, %eax
19910: 20010:
@@ -228,6 +229,7 @@ default_entry:
228page_pde_offset = (__PAGE_OFFSET >> 20); 229page_pde_offset = (__PAGE_OFFSET >> 20);
229 230
230 movl $pa(pg0), %edi 231 movl $pa(pg0), %edi
232 movl %edi, pa(init_pg_tables_start)
231 movl $pa(swapper_pg_dir), %edx 233 movl $pa(swapper_pg_dir), %edx
232 movl $PTE_ATTR, %eax 234 movl $PTE_ATTR, %eax
23310: 23510:
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 08b47a2f7af0..de9c5ee77d07 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -71,6 +71,7 @@
71/* This value is set up by the early boot code to point to the value 71/* This value is set up by the early boot code to point to the value
72 immediately after the boot time page tables. It contains a *physical* 72 immediately after the boot time page tables. It contains a *physical*
73 address, and must not be in the .bss segment! */ 73 address, and must not be in the .bss segment! */
74unsigned long init_pg_tables_start __initdata = ~0UL;
74unsigned long init_pg_tables_end __initdata = ~0UL; 75unsigned long init_pg_tables_end __initdata = ~0UL;
75 76
76/* 77/*
@@ -485,6 +486,10 @@ static void __init reserve_initrd(void)
485 return; 486 return;
486 } 487 }
487 488
489 printk(KERN_INFO "old RAMDISK: %08llx - %08llx\n", ramdisk_image,
490 ramdisk_end);
491
492
488 if (ramdisk_end <= end_of_lowmem) { 493 if (ramdisk_end <= end_of_lowmem) {
489 /* All in lowmem, easy case */ 494 /* All in lowmem, easy case */
490 /* 495 /*
@@ -511,6 +516,8 @@ static void __init reserve_initrd(void)
511 "NEW RAMDISK"); 516 "NEW RAMDISK");
512 initrd_start = ramdisk_here + PAGE_OFFSET; 517 initrd_start = ramdisk_here + PAGE_OFFSET;
513 initrd_end = initrd_start + ramdisk_size; 518 initrd_end = initrd_start + ramdisk_size;
519 printk(KERN_INFO "Allocated new RAMDISK: %08llx - %08llx\n",
520 ramdisk_here, ramdisk_here + ramdisk_size);
514 521
515 do_relocate_initrd = true; 522 do_relocate_initrd = true;
516} 523}