All of lore.kernel.org
 help / color / mirror / Atom feed
* {PATCH] x86: print out initial max_pfn_mapped
@ 2009-03-17  2:22 Yinghai Lu
  2009-03-17  2:36 ` H. Peter Anvin
  2009-05-11  9:53 ` [tip:x86/mm] x86: clean up and and " tip-bot for Yinghai Lu
  0 siblings, 2 replies; 4+ messages in thread
From: Yinghai Lu @ 2009-03-17  2:22 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Jeremy Fitzhardinge
  Cc: linux-kernel@vger.kernel.org


Impact: more debug info

check range that is mapped before init_memory_mapping().
also make 64bit have max_pfn_mapped assigned before that calling

Signed-off-by: Yinghai Lu <yinghai@kernel.org>

---
 arch/x86/kernel/setup.c |    3 +++
 arch/x86/mm/init.c      |    7 +++----
 2 files changed, 6 insertions(+), 4 deletions(-)

Index: linux-2.6/arch/x86/kernel/setup.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/setup.c
+++ linux-2.6/arch/x86/kernel/setup.c
@@ -836,12 +836,15 @@ void __init setup_arch(char **cmdline_p)
 		max_low_pfn = max_pfn;
 
 	high_memory = (void *)__va(max_pfn * PAGE_SIZE - 1) + 1;
+	max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT;
 #endif
 
 #ifdef CONFIG_X86_CHECK_BIOS_CORRUPTION
 	setup_bios_corruption_check();
 #endif
 
+	printk(KERN_DEBUG "initial memory mapped %lx\n", max_pfn_mapped<<PAGE_SHIFT);
+
 	/* max_pfn_mapped is updated here */
 	max_low_pfn_mapped = init_memory_mapping(0, max_low_pfn<<PAGE_SHIFT);
 	max_pfn_mapped = max_low_pfn_mapped;
Index: linux-2.6/arch/x86/mm/init.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/init.c
+++ linux-2.6/arch/x86/mm/init.c
@@ -65,12 +65,11 @@ static void __init find_early_table_spac
 	 */
 #ifdef CONFIG_X86_32
 	start = 0x7000;
-	e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
-					tables, PAGE_SIZE);
-#else /* CONFIG_X86_64 */
+#else
 	start = 0x8000;
-	e820_table_start = find_e820_area(start, end, tables, PAGE_SIZE);
 #endif
+	e820_table_start = find_e820_area(start, max_pfn_mapped<<PAGE_SHIFT,
+					tables, PAGE_SIZE);
 	if (e820_table_start == -1UL)
 		panic("Cannot find space for the kernel page tables");
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-11  9:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-17  2:22 {PATCH] x86: print out initial max_pfn_mapped Yinghai Lu
2009-03-17  2:36 ` H. Peter Anvin
2009-03-17  3:30   ` Yinghai Lu
2009-05-11  9:53 ` [tip:x86/mm] x86: clean up and and " tip-bot for Yinghai Lu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.