|author||Matt Fleming <email@example.com>||2014-07-11 08:45:25 +0100|
|committer||Matt Fleming <firstname.lastname@example.org>||2014-08-05 22:01:04 +0100|
x86/efi: Enforce CONFIG_RELOCATABLE for EFI boot stub
Without CONFIG_RELOCATABLE the early boot code will decompress the kernel to LOAD_PHYSICAL_ADDR. While this may have been fine in the BIOS days, that isn't going to fly with UEFI since parts of the firmware code/data may be located at LOAD_PHYSICAL_ADDR. Straying outside of the bounds of the regions we've explicitly requested from the firmware will cause all sorts of trouble. Bruno reports that his machine resets while trying to decompress the kernel image. We already go to great pains to ensure the kernel is loaded into a suitably aligned buffer, it's just that the address isn't necessarily LOAD_PHYSICAL_ADDR, because we can't guarantee that address isn't in-use by the firmware. Explicitly enforce CONFIG_RELOCATABLE for the EFI boot stub, so that we can load the kernel at any address with the correct alignment. Reported-by: Bruno Prémont <email@example.com> Tested-by: Bruno Prémont <firstname.lastname@example.org> Cc: H. Peter Anvin <email@example.com> Cc: <firstname.lastname@example.org> Signed-off-by: Matt Fleming <email@example.com>
Diffstat (limited to 'arch/x86')
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index fcefdda5136..a2409776846 100644
@@ -1536,6 +1536,7 @@ config EFI
bool "EFI stub support"
depends on EFI
+ select RELOCATABLE
This kernel feature allows a bzImage to be loaded directly
by EFI firmware without the use of a bootloader.