[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] xen: arm: load FDT below 0.5G



On 07/23/2013 06:12 PM, Ian Campbell wrote:
> From: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>

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);
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.