aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/lib.c
diff options
context:
space:
mode:
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-11 16:18:30 +0000
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>2005-05-11 16:18:30 +0000
commitbfe89d9ca0fc0a2e85549c6e47bb920d1c9dd643 (patch)
tree5d6a00c333fa8df0694f582a1b456161f93405f6 /xen/common/lib.c
parentf40dbd20a753ac12461670272492b5d9128690a5 (diff)
downloadxen-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/common/lib.c')
-rw-r--r--xen/common/lib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/xen/common/lib.c b/xen/common/lib.c
index 2e94339025..6c0706f1f1 100644
--- a/xen/common/lib.c
+++ b/xen/common/lib.c
@@ -441,6 +441,22 @@ s64 __moddi3(s64 a, s64 b)
#endif /* BITS_PER_LONG == 32 */
+unsigned long long memparse(char *s)
+{
+ unsigned long long ret = simple_strtoull(s, &s, 0);
+
+ switch (*s) {
+ case 'G': case 'g':
+ ret <<= 10;
+ case 'M': case 'm':
+ ret <<= 10;
+ case 'K': case 'k':
+ ret <<= 10;
+ }
+
+ return ret;
+}
+
/*
* Local variables:
* mode: C