diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-11 16:18:30 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-11 16:18:30 +0000 |
commit | bfe89d9ca0fc0a2e85549c6e47bb920d1c9dd643 (patch) | |
tree | 5d6a00c333fa8df0694f582a1b456161f93405f6 /xen/arch/x86/e820.c | |
parent | f40dbd20a753ac12461670272492b5d9128690a5 (diff) | |
download | xen-bfe89d9ca0fc0a2e85549c6e47bb920d1c9dd643.tar.gz xen-bfe89d9ca0fc0a2e85549c6e47bb920d1c9dd643.tar.bz2 xen-bfe89d9ca0fc0a2e85549c6e47bb920d1c9dd643.zip |
bitkeeper revision 1.1389.17.1 (42823056RNtq4AlseRHL98DJV2uJgA)
Change the Xen command-line parameter syntax. 'noacpi' and
'ignorebiostables' are gone. 'dom0_mem' can optionally take a k/m/g
suffix to specify units (default units are still kilobytes).
Also added:
1. 'mem=xxx' to specify maximum physical RAM address (supports
k/m/g suffix)
2. acpi=xxx/acpi_skip_timer_override/noapic: These all have same
semantics as in Linux. They are *automatically* propagated to
the domain0 command line, as dom0 shares resposibility for
platform initialisation.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/arch/x86/e820.c')
-rw-r--r-- | xen/arch/x86/e820.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/xen/arch/x86/e820.c b/xen/arch/x86/e820.c index 30c8d8b9bb..7c0050185f 100644 --- a/xen/arch/x86/e820.c +++ b/xen/arch/x86/e820.c @@ -3,6 +3,11 @@ #include <xen/lib.h> #include <asm/e820.h> +/* opt_mem: Limit of physical RAM. Any RAM beyond this point is ignored. */ +unsigned long long opt_mem; +static void parse_mem(char *s) { opt_mem = memparse(s); } +custom_param("mem", parse_mem); + struct e820map e820; static void __init add_memory_region(unsigned long long start, @@ -341,6 +346,31 @@ static void __init clip_4gb(void) #define clip_4gb() ((void)0) #endif +static void __init clip_mem(void) +{ + int i; + + if ( !opt_mem ) + return; + + for ( i = 0; i < e820.nr_map; i++ ) + { + if ( (e820.map[i].addr + e820.map[i].size) <= opt_mem ) + continue; + printk("Truncating memory map to %lukB\n", + (unsigned long)(opt_mem >> 10)); + if ( e820.map[i].addr >= opt_mem ) + { + e820.nr_map = i; + } + else + { + e820.map[i].size = opt_mem - e820.map[i].addr; + e820.nr_map = i + 1; + } + } +} + static void __init machine_specific_memory_setup( struct e820entry *raw, int raw_nr) { @@ -348,6 +378,7 @@ static void __init machine_specific_memory_setup( sanitize_e820_map(raw, &nr); (void)copy_e820_map(raw, nr); clip_4gb(); + clip_mem(); } unsigned long __init init_e820(struct e820entry *raw, int raw_nr) |