diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/head_32.S | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup_32.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/discontig_32.c | 3 |
3 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index bef4618feadb..ac7002fdd637 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -220,6 +220,8 @@ default_entry: | |||
220 | jb 10b | 220 | jb 10b |
221 | 1: | 221 | 1: |
222 | movl %edi,pa(init_pg_tables_end) | 222 | movl %edi,pa(init_pg_tables_end) |
223 | shrl $12, %eax | ||
224 | movl %eax, pa(max_pfn_mapped) | ||
223 | 225 | ||
224 | /* Do early initialization of the fixmap area */ | 226 | /* Do early initialization of the fixmap area */ |
225 | movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax | 227 | movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax |
@@ -251,6 +253,8 @@ page_pde_offset = (__PAGE_OFFSET >> 20); | |||
251 | cmpl %ebp,%eax | 253 | cmpl %ebp,%eax |
252 | jb 10b | 254 | jb 10b |
253 | movl %edi,pa(init_pg_tables_end) | 255 | movl %edi,pa(init_pg_tables_end) |
256 | shrl $12, %eax | ||
257 | movl %eax, pa(max_pfn_mapped) | ||
254 | 258 | ||
255 | /* Do early initialization of the fixmap area */ | 259 | /* Do early initialization of the fixmap area */ |
256 | movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax | 260 | 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 29010420458d..c985a8c305e0 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) | |||
586 | */ | 586 | */ |
587 | bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; | 587 | bootmap_size = bootmem_bootmap_pages(max_low_pfn)<<PAGE_SHIFT; |
588 | bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT, | 588 | bootmap = find_e820_area(min_low_pfn<<PAGE_SHIFT, |
589 | max_low_pfn<<PAGE_SHIFT, bootmap_size, | 589 | max_pfn_mapped<<PAGE_SHIFT, bootmap_size, |
590 | PAGE_SIZE); | 590 | PAGE_SIZE); |
591 | if (bootmap == -1L) | 591 | if (bootmap == -1L) |
592 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); | 592 | panic("Cannot find bootmem map of size %ld\n", bootmap_size); |
@@ -595,6 +595,8 @@ void __init setup_bootmem_allocator(void) | |||
595 | reserve_initrd(); | 595 | reserve_initrd(); |
596 | #endif | 596 | #endif |
597 | bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn); | 597 | bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn); |
598 | printk(KERN_INFO " mapped low ram: 0 - %08lx\n", | ||
599 | max_pfn_mapped<<PAGE_SHIFT); | ||
598 | printk(KERN_INFO " low ram: %08lx - %08lx\n", | 600 | printk(KERN_INFO " low ram: %08lx - %08lx\n", |
599 | min_low_pfn<<PAGE_SHIFT, max_low_pfn<<PAGE_SHIFT); | 601 | min_low_pfn<<PAGE_SHIFT, max_low_pfn<<PAGE_SHIFT); |
600 | printk(KERN_INFO " bootmap %08lx - %08lx\n", | 602 | printk(KERN_INFO " bootmap %08lx - %08lx\n", |
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 73a983489c60..914a81ee7855 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -163,7 +163,8 @@ static void __init allocate_pgdat(int nid) | |||
163 | else { | 163 | else { |
164 | unsigned long pgdat_phys; | 164 | unsigned long pgdat_phys; |
165 | pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT, | 165 | pgdat_phys = find_e820_area(min_low_pfn<<PAGE_SHIFT, |
166 | max_low_pfn<<PAGE_SHIFT, sizeof(pg_data_t), | 166 | (nid ? max_low_pfn:max_pfn_mapped)<<PAGE_SHIFT, |
167 | sizeof(pg_data_t), | ||
167 | PAGE_SIZE); | 168 | PAGE_SIZE); |
168 | NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT)); | 169 | NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(pgdat_phys>>PAGE_SHIFT)); |
169 | reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), | 170 | reserve_early(pgdat_phys, pgdat_phys + sizeof(pg_data_t), |