]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
UBUNTU: SAUCE: efi: arm-stub: Correct FDT and initrd allocation rules for arm64
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 22 Mar 2017 15:22:04 +0000 (10:22 -0500)
committerTim Gardner <tim.gardner@canonical.com>
Tue, 28 Mar 2017 20:17:54 +0000 (14:17 -0600)
commit49c4f5c79461404d7a443bf5b3fdf1a1346f2ec8
tree1a4a7d94d24f89114fb81eee3a31227dae79d284
parent393c927325cda9485b3eaa8fc25b6794552488e4
UBUNTU: SAUCE: efi: arm-stub: Correct FDT and initrd allocation rules for arm64

On arm64, we have made some changes over the past year to the way the
kernel itself is allocated and to how it deals with the initrd and FDT.
This patch brings the allocation logic in the EFI stub in line with that,
which is necessary because the introduction of KASLR has created the
possibility for the initrd to be allocated in a place where the kernel
may not be able to map it. (This is mostly a theoretical scenario, since
it only affects systems where the physical memory footprint exceeds the
size of the linear mapping.)

Since we know the kernel itself will be covered by the linear mapping,
choose a suitably sized window (i.e., based on the size of the linear
region) covering the kernel when allocating memory for the initrd.

The FDT may be anywhere in memory on arm64 now that we map it via the
fixmap, so we can lift the address restriction there completely.

BugLink: http://bugs.launchpad.net/bugs/1675046
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-By: Jeffrey Hugo <jhugo@codeaurora.org>
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
arch/arm/include/asm/efi.h
arch/arm64/include/asm/efi.h
drivers/firmware/efi/libstub/arm-stub.c