diff options
author | maf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk> | 2005-02-21 17:36:54 +0000 |
---|---|---|
committer | maf46@burn.cl.cam.ac.uk <maf46@burn.cl.cam.ac.uk> | 2005-02-21 17:36:54 +0000 |
commit | ce9898f4ae281edb10529db00a2a71117ef048d0 (patch) | |
tree | b1f876e71b29eb8f8991d3f9d6452af18b2b15cf /xen/arch/x86/e820.c | |
parent | ab01238d05f468e4b61d7932e72eabc2f683a10d (diff) | |
download | xen-ce9898f4ae281edb10529db00a2a71117ef048d0.tar.gz xen-ce9898f4ae281edb10529db00a2a71117ef048d0.tar.bz2 xen-ce9898f4ae281edb10529db00a2a71117ef048d0.zip |
bitkeeper revision 1.1233 (421a1c36TYJWUEtp558QjJv1X0XXrQ)
If debugging is enabled, printout the e820 map for vmx guests.
Signed-off-by: michael.fetterman@cl.cam.ac.uk
Diffstat (limited to 'xen/arch/x86/e820.c')
-rw-r--r-- | xen/arch/x86/e820.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index cf78c21844..f97e50f490 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -27,15 +27,22 @@ static void __init add_memory_region(unsigned long long start, #define E820_DEBUG 1 -static void __init print_memory_map(void) +#ifndef NDEBUG +#define __init_unless_debugging +#else +#define __init_unless_debugging __init +#endif + +void __init_unless_debugging +print_e820_memory_map(struct e820entry *map, int entries) { int i; - for (i = 0; i < e820.nr_map; i++) { + for (i = 0; i < entries; i++) { printk(" %016Lx - %016Lx ", - e820.map[i].addr, - e820.map[i].addr + e820.map[i].size); - switch (e820.map[i].type) { + map[i].addr, + map[i].addr + map[i].size); + switch (map[i].type) { case E820_RAM: printk("(usable)\n"); break; case E820_RESERVED: @@ -47,7 +54,7 @@ static void __init print_memory_map(void) case E820_NVS: printk("(ACPI NVS)\n"); break; - default: printk("type %u\n", e820.map[i].type); + default: printk("type %u\n", map[i].type); break; } } @@ -343,10 +350,10 @@ static void __init machine_specific_memory_setup( clip_4gb(); } -unsigned long init_e820(struct e820entry *raw, int raw_nr) +unsigned long __init init_e820(struct e820entry *raw, int raw_nr) { machine_specific_memory_setup(raw, raw_nr); printk(KERN_INFO "Physical RAM map:\n"); - print_memory_map(); + print_e820_memory_map(e820.map, e820.nr_map); return find_max_pfn(); } |