summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2012-10-26 10:17:38 +0200
committerIngo Molnar <mingo@kernel.org>2012-10-26 10:17:38 +0200
commit8b724e2a12d553cad8ad412846511c783a92d25e (patch)
treea07e14802a768a7156f70e2f9550ff98fe2b17f1 /arch/x86/kernel/setup.c
parentf82f64dd9f485e13f29f369772d4a0e868e5633a (diff)
parent5189c2a7c7769ee9d037d76c1a7b8550ccf3481c (diff)
downloadtalos-obmc-linux-8b724e2a12d553cad8ad412846511c783a92d25e.tar.gz
talos-obmc-linux-8b724e2a12d553cad8ad412846511c783a92d25e.zip
Merge tag 'efi-for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mfleming/efi into x86/urgent
Pull EFI fixes from Matt Fleming: "Fix oops with EFI variables on mixed 32/64-bit firmware/kernels and document EFI git repository location on kernel.org." Conflicts: arch/x86/include/asm/efi.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-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 5d888af8682a..ca45696f30fb 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -1049,6 +1049,18 @@ void __init setup_arch(char **cmdline_p)
arch_init_ideal_nops();
register_refined_jiffies(CLOCK_TICK_RATE);
+
+#ifdef CONFIG_EFI
+ /* Once setup is done above, disable efi_enabled on mismatched
+ * firmware/kernel archtectures since there is no support for
+ * runtime services.
+ */
+ if (efi_enabled && IS_ENABLED(CONFIG_X86_64) != efi_64bit) {
+ pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
+ efi_unmap_memmap();
+ efi_enabled = 0;
+ }
+#endif
}
#ifdef CONFIG_X86_32
OpenPOWER on IntegriCloud