From: David Vrabel <david.vrabel@citrix.com>
To: xen-devel@lists.xensource.com
Cc: Ian Campbell <ian.campbell@citrix.com>,
David Vrabel <david.vrabel@citrix.com>
Subject: [PATCH 11/11] arm: add dom0_mem command line argument
Date: Mon, 19 Mar 2012 17:52:09 +0000 [thread overview]
Message-ID: <1332179529-1828-12-git-send-email-david.vrabel@citrix.com> (raw)
In-Reply-To: <1332179529-1828-1-git-send-email-david.vrabel@citrix.com>
From: David Vrabel <david.vrabel@citrix.com>
Add a simple dom0_mem command line argument. It's not as flexible as
the x86 equivalent (the 'max' and 'min' prefixes are not supported).
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
---
xen/arch/arm/domain_build.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
index 963f1cf..cefd693 100644
--- a/xen/arch/arm/domain_build.c
+++ b/xen/arch/arm/domain_build.c
@@ -17,6 +17,17 @@
static unsigned int __initdata opt_dom0_max_vcpus;
integer_param("dom0_max_vcpus", opt_dom0_max_vcpus);
+#define DOM0_MEM_DEFAULT 0x8000000 /* 128 MiB */
+static u64 __initdata dom0_mem = DOM0_MEM_DEFAULT;
+
+static void __init parse_dom0_mem(const char *s)
+{
+ dom0_mem = parse_size_and_unit(s, &s);
+ if ( dom0_mem == 0 )
+ dom0_mem = DOM0_MEM_DEFAULT;
+}
+custom_param("dom0_mem", parse_dom0_mem);
+
/*
* Amount of extra space required to dom0's device tree. No new nodes
* are added (yet) so no additional space is needed.
@@ -193,6 +204,8 @@ static int prepare_dtb(struct domain *d, struct kernel_info *kinfo)
int new_size;
int ret;
+ kinfo->unassigned_mem = dom0_mem;
+
fdt = device_tree_flattened;
new_size = fdt_totalsize(fdt) + DOM0_FDT_EXTRA_SIZE;
@@ -261,8 +274,6 @@ int construct_dom0(struct domain *d)
if ( (rc = p2m_alloc_table(d)) != 0 )
return rc;
- kinfo.unassigned_mem = 0x08000000; /* XXX */
-
rc = prepare_dtb(d, &kinfo);
if ( rc < 0 )
return rc;
--
1.7.2.5
prev parent reply other threads:[~2012-03-19 17:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-19 17:51 [PATCHv2 00/11] arm: pass a device tree to dom0 David Vrabel
2012-03-19 17:51 ` [PATCH 01/11] libfdt: move headers to xen/include/xen/libfdt/ David Vrabel
2012-03-19 17:58 ` David Vrabel
2012-03-19 17:52 ` [PATCH 02/11] MAINTAINERS: add device tree maintainer David Vrabel
2012-03-19 17:54 ` Keir Fraser
2012-03-19 17:52 ` [PATCH 03/11] device tree: follow coding style David Vrabel
2012-03-19 17:52 ` [PATCH 04/11] device tree: correctly ignore unit-address when matching nodes by name David Vrabel
2012-03-19 17:52 ` [PATCH 05/11] device tree: add device_tree_for_each_node() David Vrabel
2012-03-22 11:12 ` Ian Campbell
2012-03-22 12:47 ` David Vrabel
2012-03-19 17:52 ` [PATCH 06/11] device tree: add device_tree_dump() to print a flat device tree David Vrabel
2012-03-19 17:52 ` [PATCH 07/11] arm: remove the hack for loading vmlinux images David Vrabel
2012-03-19 17:52 ` [PATCH 08/11] device tree, arm: supply a flat device tree to dom0 David Vrabel
2012-03-20 10:43 ` David Vrabel
2012-03-20 10:52 ` Ian Campbell
2012-03-22 14:06 ` Ian Campbell
2012-03-22 14:27 ` David Vrabel
2012-03-22 17:12 ` David Vrabel
2012-03-19 17:52 ` [PATCH 09/11] Allow cmdline_parse() to be used with const strings David Vrabel
2012-03-19 17:54 ` Keir Fraser
2012-03-19 17:52 ` [PATCH 10/11] arm: use bootargs for the command line David Vrabel
2012-03-22 14:22 ` Ian Campbell
2012-03-22 14:30 ` Ian Campbell
2012-03-22 15:03 ` David Vrabel
2012-03-19 17:52 ` David Vrabel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1332179529-1828-12-git-send-email-david.vrabel@citrix.com \
--to=david.vrabel@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).