aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2013-02-20 15:36:12 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-02-20 16:18:36 -0500
commitfb834c7acc5e140cf4f9e86da93a66de8c0514da (patch)
tree3763a4af5de633bccf1f86fad24c3ef7440c2476 /arch
parent27cf929845b10043f2257693c7d179a9e0b1980e (diff)
x86, efi: Make "noefi" really disable EFI runtime serivces
commit 1de63d60cd5b ("efi: Clear EFI_RUNTIME_SERVICES rather than EFI_BOOT by "noefi" boot parameter") attempted to make "noefi" true to its documentation and disable EFI runtime services to prevent the bricking bug described in commit e0094244e41c ("samsung-laptop: Disable on EFI hardware"). However, it's not possible to clear EFI_RUNTIME_SERVICES from an early param function because EFI_RUNTIME_SERVICES is set in efi_init() *after* parse_early_param(). This resulted in "noefi" effectively becoming a no-op and no longer providing users with a way to disable EFI, which is bad for those users that have buggy machines. Reported-by: Walt Nelson Jr <walt0924@gmail.com> Cc: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Cc: <stable@vger.kernel.org> Signed-off-by: Matt Fleming <matt.fleming@intel.com> Link: http://lkml.kernel.org/r/1361392572-25657-1-git-send-email-matt@console-pimps.org Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/platform/efi/efi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 928bf837040a..e2cd38ffc406 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -85,9 +85,10 @@ int efi_enabled(int facility)
85} 85}
86EXPORT_SYMBOL(efi_enabled); 86EXPORT_SYMBOL(efi_enabled);
87 87
88static bool disable_runtime = false;
88static int __init setup_noefi(char *arg) 89static int __init setup_noefi(char *arg)
89{ 90{
90 clear_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility); 91 disable_runtime = true;
91 return 0; 92 return 0;
92} 93}
93early_param("noefi", setup_noefi); 94early_param("noefi", setup_noefi);
@@ -734,7 +735,7 @@ void __init efi_init(void)
734 if (!efi_is_native()) 735 if (!efi_is_native())
735 pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n"); 736 pr_info("No EFI runtime due to 32/64-bit mismatch with kernel\n");
736 else { 737 else {
737 if (efi_runtime_init()) 738 if (disable_runtime || efi_runtime_init())
738 return; 739 return;
739 set_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility); 740 set_bit(EFI_RUNTIME_SERVICES, &x86_efi_facility);
740 } 741 }