diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2019-10-29 18:37:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-11-12 19:28:15 +0100 |
commit | e20db7964d3e95e91cb147b4f02f38fd1bb35e10 (patch) | |
tree | 595c235dc7086c5cec2db17b8ebb109cc2326705 /arch/h8300/configs/h8300h-sim_defconfig | |
parent | 95c085ef6057f86f11ccf40aed294e3c47992e1b (diff) | |
download | linux-stable-e20db7964d3e95e91cb147b4f02f38fd1bb35e10.tar.gz linux-stable-e20db7964d3e95e91cb147b4f02f38fd1bb35e10.tar.bz2 linux-stable-e20db7964d3e95e91cb147b4f02f38fd1bb35e10.zip |
efi: libstub/arm: Account for firmware reserved memory at the base of RAM
[ Upstream commit 41cd96fa149b29684ebd38759fefb07f9c7d5276 ]
The EFI stubloader for ARM starts out by allocating a 32 MB window
at the base of RAM, in order to ensure that the decompressor (which
blindly copies the uncompressed kernel into that window) does not
overwrite other allocations that are made while running in the context
of the EFI firmware.
In some cases, (e.g., U-Boot running on the Raspberry Pi 2), this is
causing boot failures because this initial allocation conflicts with
a page of reserved memory at the base of RAM that contains the SMP spin
tables and other pieces of firmware data and which was put there by
the bootloader under the assumption that the TEXT_OFFSET window right
below the kernel is only used partially during early boot, and will be
left alone once the memory reservations are processed and taken into
account.
So let's permit reserved memory regions to exist in the region starting
at the base of RAM, and ending at TEXT_OFFSET - 5 * PAGE_SIZE, which is
the window below the kernel that is not touched by the early boot code.
Tested-by: Guillaume Gardet <Guillaume.Gardet@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Chester Lin <clin@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: https://lkml.kernel.org/r/20191029173755.27149-5-ardb@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/h8300/configs/h8300h-sim_defconfig')
0 files changed, 0 insertions, 0 deletions