[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] arm_boot: Change initrd load address to "halfwa
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] arm_boot: Change initrd load address to "halfway through RAM" |
Date: |
Fri, 26 Oct 2012 15:53:20 +0100 |
On 26 October 2012 15:19, Peter Maydell <address@hidden> wrote:
> + /* Put the initrd halfway through RAM; this means that on
> + * most boards we will not be in danger of overlapping the
> + * initrd with the kernel, but will still work OK on models
> + * with only small amounts of RAM (which can be assumed to
> + * have correspondingly small kernels).
> + */
> + info->initrd_start = info->loader_start + (info->ram_size / 2);
I've realised this won't quite work for boards with lots of RAM:
for instance a vexpress-a15 with 6GB of RAM would put the initrd
over the 4GB boundary where the kernel can't get at it. Instead:
info->initrd_start = info->loader_start +
MIN(info->ram_size / 2, 128 * 1024 * 1024);
(and adjust comment to match). Anybody with a 128MB kernel should
definitely consider enabling modules :-)
-- PMM