]> Git Repo - linux.git/commit
efi/arm-stub: Round up FDT allocation to mapping size
authorArd Biesheuvel <[email protected]>
Tue, 4 Apr 2017 16:02:39 +0000 (17:02 +0100)
committerIngo Molnar <[email protected]>
Wed, 5 Apr 2017 10:27:24 +0000 (12:27 +0200)
commit24d7c494ce46d5bb6c8fd03e88a48ae249ec1492
tree31e5597be4e43c22794f146c5f7408d7adf96be6
parent138728dd4ee30d3f35587c269c46cc829ec4d58b
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 <[email protected]>
Tested-by: Richard Ruigrok <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Matt Fleming <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/arm64/include/asm/efi.h
drivers/firmware/efi/libstub/fdt.c
This page took 0.058597 seconds and 4 git commands to generate.