diff options
author | Yinghai Lu <yhlu.kernel@gmail.com> | 2008-06-01 23:53:50 -0700 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-03 13:26:28 +0200 |
commit | 6af61a7614a306fe882a0c2b4ddc63b65aa66efc (patch) | |
tree | a4027323b741d9784b5f3755fe7a276c536932ee /arch/x86/kernel | |
parent | 287572cb38de7f270b59191a0fecfa5c5de7765d (diff) |
x86: clean up max_pfn_mapped usage - 32-bit
on 32-bit in head_32.S after initial page table is done, we get initial
max_pfn_mapped, and then kernel_physical_mapping_init will give us
a final one.
We need to use that to make sure find_e820_area will get valid addresses
for boot_map and for NODE_DATA(0) on numa32.
XEN PV and lguest may need to assign max_pfn_mapped too.
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/head_32.S | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup_32.c | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index bef4618fead..ac7002fdd63 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S @@ -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 @@ -251,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 diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 29010420458..c985a8c305e 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c @@ -586,7 +586,7 @@ void __init setup_bootmem_allocator(void) */ bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT, - max_low_pfn<<PAGE_SHIFT, bootmap_size, + max_pfn_mapped<<PAGE_SHIFT, bootmap_size, PAGE_SIZE); if (bootmap == -1L) panic("Cannot find bootmem map of size %ld\n", bootmap_size); @@ -595,6 +595,8 @@ void __init setup_bootmem_allocator(void) reserve_initrd(); #endif bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn); + printk(KERN_INFO " mapped low ram: 0 - %08lx\n", + max_pfn_mapped<<PAGE_SHIFT); printk(KERN_INFO " low ram: %08lx - %08lx\n", min_low_pfn<<PAGE_SHIFT, max_low_pfn<<PAGE_SHIFT); printk(KERN_INFO " bootmap %08lx - %08lx\n", |