From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org, xen-devel@lists.xen.org
Subject: Re: [PATCH v2] xen: arm: handle initrd addresses above the 4G boundary
Date: Mon, 09 Dec 2013 15:05:59 +0000 [thread overview]
Message-ID: <52A5DC57.3000409@linaro.org> (raw)
In-Reply-To: <1386589415-8369-1-git-send-email-ian.campbell@citrix.com>
On 12/09/2013 11:43 AM, Ian Campbell wrote:
> The Xgene platform has no RAM below 4G.
>
> The /chosen/linux,initrd-* properties do not have "reg" semantics and
> therefore #*-size are not used when interpreting. Instead they are are simply
> numbers which are interpreted according to the properties length.
>
> Fix this both when parsing the entry in the host DTB and when creating the
> dom0 DTB. For dom0 we simply hardcode a 64-bit size, this is acceptable
> even for a 32-bit guest.
>
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
> ---
> v2: improve error messages
> only accept start and end addresses which are exaclty u32 or u64 sized.
> correct parameter name in dt_size_to_cells and comment on the rounding
> down behaviour which it has.
> ---
> xen/arch/arm/domain_build.c | 19 +++++++++++++------
> xen/common/device_tree.c | 37 ++++++++++++++++++++++++++++++++-----
> xen/include/xen/device_tree.h | 8 +++++++-
> 3 files changed, 52 insertions(+), 12 deletions(-)
>
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 213b3ac..532f39c6 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -222,11 +222,12 @@ static int write_properties(struct domain *d, struct kernel_info *kinfo,
> */
> if ( early_info.modules.module[MOD_INITRD].size )
> {
> - res = fdt_property_cell(kinfo->fdt, "linux,initrd-start", 0);
> + u64 a = 0;
> + res = fdt_property(kinfo->fdt, "linux,initrd-start", &a, sizeof(a));
> if ( res )
> return res;
>
> - res = fdt_property_cell(kinfo->fdt, "linux,initrd-end", 0);
> + res = fdt_property(kinfo->fdt, "linux,initrd-end", &a, sizeof(a));
> if ( res )
> return res;
> }
> @@ -926,6 +927,8 @@ static void initrd_load(struct kernel_info *kinfo)
> unsigned long offs;
> int node;
> int res;
> + u32 val[2];
Shouldn't it be __be32?
With this fix and given your answer on the previous version:
Acked-by: Julien Grall <julien.grall@linaro.org>
--
Julien Grall
next prev parent reply other threads:[~2013-12-09 15:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-09 11:43 [PATCH v2] xen: arm: handle initrd addresses above the 4G boundary Ian Campbell
2013-12-09 15:05 ` Julien Grall [this message]
2013-12-09 15:47 ` Ian Campbell
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=52A5DC57.3000409@linaro.org \
--to=julien.grall@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.