All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: Ian Campbell <ijc@hellion.org.uk>
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] xen: arm: load FDT below 0.5G
Date: Wed, 24 Jul 2013 14:44:08 +0100	[thread overview]
Message-ID: <51EFDA28.6050301@linaro.org> (raw)
In-Reply-To: <1374599528-4250-1-git-send-email-ijc@hellion.org.uk>

On 07/23/2013 06:12 PM, Ian Campbell wrote:
> From: Ian Campbell <ian.campbell@citrix.com>
> 
> The 32-bit Linux kernel uses its lowmem direct mapping to access the FDT. The
> lowmem mapping is around 3/4GiB but varies depending on the kernel's .config.
> Use a limit of 1/2G to be safe.
> 
> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

I'm curious, how did you find this value? I can't easily find a specific
range for the lowmem direct mapping.

> ---
>  xen/arch/arm/domain_build.c | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
> index 056c9df..ff9e679 100644
> --- a/xen/arch/arm/domain_build.c
> +++ b/xen/arch/arm/domain_build.c
> @@ -504,13 +504,14 @@ static int prepare_dtb(struct domain *d, struct kernel_info *kinfo)
>          goto err;
>  
>      /*
> -     * DTB must be load below 4GiB and far enough from linux (Linux uses
> -     * the space after it to decompress)
> -     * Load the DTB at the end of the first bank, while ensuring it is
> -     * also below 4G
> +     * DTB must be loaded below around 0.5GiB and far enough from
> +     * linux (Linux uses the space after it to decompress).
> +     *
> +     * Load the DTB as high as possible in the first bank, while
> +     * ensuring it is also below 0.5G
>       */
>      end = kinfo->mem.bank[0].start + kinfo->mem.bank[0].size;
> -    end = MIN(1ull << 32, end);
> +    end = MIN(kinfo->mem.bank[0].start + (1ull << 29), end);
>      kinfo->dtb_paddr = end - fdt_totalsize(kinfo->fdt);
>      /* Align the address to 2Mb. Linux only requires 4 byte alignment */
>      kinfo->dtb_paddr &= ~((2 << 20) - 1);
> 

  reply	other threads:[~2013-07-24 13:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 17:12 [PATCH] xen: arm: load FDT below 0.5G Ian Campbell
2013-07-24 13:44 ` Julien Grall [this message]
2013-07-24 14:37   ` Ian Campbell
2013-07-29 14:46     ` Ian Campbell
2013-07-30  9:53       ` Julien Grall
2013-07-30  9:57         ` Ian Campbell
2013-07-30 10:15           ` Julien Grall

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=51EFDA28.6050301@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=ijc@hellion.org.uk \
    --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.