aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-10-24 13:00:44 -0400
committerMatt Fleming <matt.fleming@intel.com>2012-10-25 14:09:40 -0400
commit5189c2a7c7769ee9d037d76c1a7b8550ccf3481c (patch)
tree29582d23f219fbefe00c216ec8a619ab8bf9996f /arch/x86/kernel
parent78bef24e8477653853eb028dfc18471f05e54955 (diff)
x86: efi: Turn off efi_enabled after setup on mixed fw/kernel
When 32-bit EFI is used with 64-bit kernel (or vice versa), turn off efi_enabled once setup is done. Beyond setup, it is normally used to determine if runtime services are available and we will have none. This will resolve issues stemming from efivars modprobe panicking on a 32/64-bit setup, as well as some reboot issues on similar setups. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45991 Reported-by: Marko Kohtala <marko.kohtala@gmail.com> Reported-by: Maxim Kammerer <mk@dee.su> Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: stable@kernel.org # 3.4 - 3.6 Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/setup.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index a2bb18e02839..6fd7752cee96 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1035,6 +1035,18 @@ void __init setup_arch(char **cmdline_p)
1035 arch_init_ideal_nops(); 1035 arch_init_ideal_nops();
1036 1036
1037 register_refined_jiffies(CLOCK_TICK_RATE); 1037 register_refined_jiffies(CLOCK_TICK_RATE);
1038
1039#ifdef CONFIG_EFI
1040 /* Once setup is done above, disable efi_enabled on mismatched
1041 * firmware/kernel archtectures since there is no support for
1042 * runtime services.
1043 */
1044 if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) {
1045 pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
1046 efi_unmap_memmap();
1047 efi_enabled = 0;
1048 }
1049#endif
1038} 1050}
1039 1051
1040#ifdef CONFIG_X86_32 1052#ifdef CONFIG_X86_32