]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: efi: prefer AllocatePages() over efi_low_alloc() for vmlinux
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 24 Jul 2015 11:38:27 +0000 (12:38 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:41 +0000 (11:08 +0100)
commit3cbe74558342916e8c678fb68870834e6647006e
tree66b2d1ac7d059ad95a7557d4207ce237a6a701b5
parent403566f649c67e6cd9f9f59c0f69037389f54810
arm64: efi: prefer AllocatePages() over efi_low_alloc() for vmlinux

When allocating memory for the kernel image, try the AllocatePages()
boot service to obtain memory at the preferred offset of
'dram_base + TEXT_OFFSET', and only revert to efi_low_alloc() if that
fails. This is the only way to allocate at the base of DRAM if DRAM
starts at 0x0, since efi_low_alloc() refuses to allocate at 0x0.

Tested-by: Haojian Zhuang <haojian.zhuang@linaro.org>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/efi-stub.c