diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2017-04-04 18:02:39 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-04-05 12:27:24 +0200 |
commit | 24d7c494ce46d5bb6c8fd03e88a48ae249ec1492 (patch) | |
tree | 31e5597be4e43c22794f146c5f7408d7adf96be6 /drivers/firmware/efi/libstub/Makefile | |
parent | efi/arm-stub: Correct FDT and initrd allocation rules for arm64 (diff) | |
download | linux-24d7c494ce46d5bb6c8fd03e88a48ae249ec1492.tar.xz linux-24d7c494ce46d5bb6c8fd03e88a48ae249ec1492.zip |
efi/arm-stub: Round up FDT allocation to mapping size
The FDT is mapped via a fixmap entry that is at least 2 MB in size and
2 MB aligned on 4 KB page size kernels.
On UEFI systems, the FDT allocation may share this 2 MB mapping with a
reserved region (or another memory region that we should never map),
unless we account for this in the size of the allocation (the alignment
is already 2 MB)
So instead of taking guesses at the needed space, simply allocate 2 MB
immediately. The allocation will be recorded as EFI_LOADER_DATA, and the
kernel only memblock_reserve()'s the actual size of the FDT, so the
unused space will be released back to the kernel.
Reviewed-By: Jeffrey Hugo <jhugo@codeaurora.org>
Tested-by: Richard Ruigrok <rruigrok@codeaurora.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-6-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/Makefile')
0 files changed, 0 insertions, 0 deletions