kernel-ark/drivers/firmware/efi/libstub
Ard Biesheuvel 24d7c494ce 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>
2017-04-05 12:27:24 +02:00
..
arm32-stub.c efi/arm/libstub: Make screen_info accessible to the UEFI stub 2016-04-28 11:33:59 +02:00
arm64-stub.c arm64: kaslr: increase randomization granularity 2016-04-28 19:44:15 +01:00
arm-stub.c efi/arm-stub: Correct FDT and initrd allocation rules for arm64 2017-04-05 12:27:23 +02:00
efi-stub-helper.c efi/libstub: Make file I/O chunking x86-specific 2017-02-07 10:42:11 +01:00
efistub.h efi: Deduplicate efi_file_size() / _read() / _close() 2017-02-01 08:45:42 +01:00
fdt.c efi/arm-stub: Round up FDT allocation to mapping size 2017-04-05 12:27:24 +02:00
gop.c efi/libstub: Skip GOP with PIXEL_BLT_ONLY format 2017-04-05 09:20:18 +02:00
Makefile efi: Get and store the secure boot status 2017-02-07 10:42:10 +01:00
random.c efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit 2016-11-25 07:15:23 +01:00
secureboot.c efi/libstub: Treat missing SecureBoot variable as Secure Boot disabled 2017-03-02 08:11:18 +01:00
string.c arm64/efi: isolate EFI stub from the kernel proper 2015-10-12 16:20:12 +01:00