]> git.ipfire.org Git - thirdparty/grub.git/commit
efi: Restrict arm/arm64 linux loader initrd placement
authorLeif Lindholm <leif.lindholm@linaro.org>
Mon, 9 Jul 2018 17:33:05 +0000 (18:33 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 25 Jul 2018 12:18:11 +0000 (14:18 +0200)
commita2f26adfef2fc8a7d7392c3704031df4624c67b0
treeeecc7223d02fff6921fe4667110abea0d3839560
parent77808dd66bda72ff14873bcd701ec25a0db1dfee
efi: Restrict arm/arm64 linux loader initrd placement

The 32-bit arm Linux kernel is built as a zImage, which self-decompresses
down to near start of RAM. In order for an initrd/initramfs to be
accessible, it needs to be placed within the first ~768MB of RAM.
The initrd loader built into the kernel EFI stub restricts this down to
512MB for simplicity - so enable the same restriction in grub.

For arm64, the requirement is within a 1GB aligned 32GB window also
covering the (runtime) kernel image. Since the EFI stub loader itself
will attempt to relocate to near start of RAM, force initrd to be loaded
completely within the first 32GB of RAM.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/loader/arm64/linux.c