--- arch/x86/kernel/e820.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) Index: linux-2.6/arch/x86/kernel/e820.c =================================================================== --- linux-2.6.orig/arch/x86/kernel/e820.c +++ linux-2.6/arch/x86/kernel/e820.c @@ -155,20 +155,24 @@ static void __init e820_print_type(u32 t } } -void __init e820_print_map(char *who) +static void __init __e820_print_map(struct e820entry *map, int nr_map, char *who) { int i; - for (i = 0; i < e820.nr_map; i++) { + for (i = 0; i < nr_map; i++) { printk(KERN_INFO "%s: [mem %#018Lx-%#018Lx] ", who, - (unsigned long long) e820.map[i].addr, + (unsigned long long) map[i].addr, (unsigned long long) - (e820.map[i].addr + e820.map[i].size - 1)); - e820_print_type(e820.map[i].type); + (map[i].addr + map[i].size - 1)); + e820_print_type(map[i].type); printk(KERN_CONT "\n"); } } +void __init e820_print_map(char *who) +{ + __e820_print_map(e820.map, e820.nr_map, who); +} /* * Sanitize the BIOS e820 map. * @@ -1074,9 +1078,12 @@ void __init setup_memory_map(void) { char *who; + printk(KERN_INFO "Physical RAM map:\n"); + __e820_print_map(boot_params.e820_map, boot_params.e820_entries, "raw"); + who = x86_init.resources.memory_setup(); memcpy(&e820_saved, &e820, sizeof(struct e820map)); - printk(KERN_INFO "e820: BIOS-provided physical RAM map:\n"); + printk(KERN_INFO "e820: BIOS-provided physical RAM map (sanitized by setup):\n"); e820_print_map(who); }