On 26 October 2012 15:19, Peter Maydell <[email protected]> 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