]> git.baikalelectronics.ru Git - kernel.git/commit
x86/boot: EFI_MIXED should not prohibit loading above 4G
authorMatt Fleming <matt.fleming@intel.com>
Sat, 7 Jun 2014 11:26:20 +0000 (12:26 +0100)
committerH. Peter Anvin <hpa@zytor.com>
Sat, 7 Jun 2014 16:31:00 +0000 (09:31 -0700)
commit15ff38340d8c48f63c80e87e28b43779f7a9c7f8
tree16ac951fdd60f740cf138f57e3eb18968f2952c5
parentc3c28567324f48c1418ffe3fa9633f86f413623f
x86/boot: EFI_MIXED should not prohibit loading above 4G

commit 2e8dc0c0fee2 ("x86/efi: Wire up CONFIG_EFI_MIXED") introduced a
regression for the functionality to load kernels above 4G. The relevant
(incorrect) reasoning behind this change can be seen in the commit
message,

  "The xloadflags field in the bzImage header is also updated to reflect
  that the kernel supports both entry points by setting both of
  XLF_EFI_HANDOVER_32 and XLF_EFI_HANDOVER_64 when CONFIG_EFI_MIXED=y.
  XLF_CAN_BE_LOADED_ABOVE_4G is disabled so that the kernel text is
  guaranteed to be addressable with 32-bits."

This is obviously bogus since 32-bit EFI loaders will never place the
kernel above the 4G mark. So this restriction is entirely unnecessary.

But things are worse than that - since we want to encourage people to
always compile with CONFIG_EFI_MIXED=y so that their kernels work out of
the box for both 32-bit and 64-bit firmware, commit 2e8dc0c0fee2
effectively disables XLF_CAN_BE_LOADED_ABOVE_4G completely.

Remove the overzealous and superfluous restriction and restore the
XLF_CAN_BE_LOADED_ABOVE_4G functionality.

Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Link: http://lkml.kernel.org/r/1402140380-15377-1-git-send-email-matt@console-pimps.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
arch/x86/boot/header.S