aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJian-Hong Pan <jian-hong@endlessm.com>2019-04-12 04:01:53 -0400
committerIngo Molnar <mingo@kernel.org>2019-04-16 04:01:24 -0400
commit0082517fa4bce073e7cf542633439f26538a14cc (patch)
tree0061ade9b7cc8e9fc623a640b37aeaf68af790e2
parent510bb96fe5b3480b4b22d815786377e54cb701e7 (diff)
x86/reboot, efi: Use EFI reboot for Acer TravelMate X514-51T
Upon reboot, the Acer TravelMate X514-51T laptop appears to complete the shutdown process, but then it hangs in BIOS POST with a black screen. The problem is intermittent - at some points it has appeared related to Secure Boot settings or different kernel builds, but ultimately we have not been able to identify the exact conditions that trigger the issue to come and go. Besides, the EFI mode cannot be disabled in the BIOS of this model. However, after extensive testing, we observe that using the EFI reboot method reliably avoids the issue in all cases. So add a boot time quirk to use EFI reboot on such systems. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=203119 Signed-off-by: Jian-Hong Pan <jian-hong@endlessm.com> Signed-off-by: Daniel Drake <drake@endlessm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Cc: linux@endlessm.com Link: http://lkml.kernel.org/r/20190412080152.3718-1-jian-hong@endlessm.com [ Fix !CONFIG_EFI build failure, clarify the code and the changelog a bit. ] Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--arch/x86/kernel/reboot.c21
-rw-r--r--include/linux/efi.h7
2 files changed, 27 insertions, 1 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 725624b6c0c0..8fd3cedd9acc 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -81,6 +81,19 @@ static int __init set_bios_reboot(const struct dmi_system_id *d)
81 return 0; 81 return 0;
82} 82}
83 83
84/*
85 * Some machines don't handle the default ACPI reboot method and
86 * require the EFI reboot method:
87 */
88static int __init set_efi_reboot(const struct dmi_system_id *d)
89{
90 if (reboot_type != BOOT_EFI && !efi_runtime_disabled()) {
91 reboot_type = BOOT_EFI;
92 pr_info("%s series board detected. Selecting EFI-method for reboot.\n", d->ident);
93 }
94 return 0;
95}
96
84void __noreturn machine_real_restart(unsigned int type) 97void __noreturn machine_real_restart(unsigned int type)
85{ 98{
86 local_irq_disable(); 99 local_irq_disable();
@@ -166,6 +179,14 @@ static const struct dmi_system_id reboot_dmi_table[] __initconst = {
166 DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"), 179 DMI_MATCH(DMI_PRODUCT_NAME, "AOA110"),
167 }, 180 },
168 }, 181 },
182 { /* Handle reboot issue on Acer TravelMate X514-51T */
183 .callback = set_efi_reboot,
184 .ident = "Acer TravelMate X514-51T",
185 .matches = {
186 DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
187 DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate X514-51T"),
188 },
189 },
169 190
170 /* Apple */ 191 /* Apple */
171 { /* Handle problems with rebooting on Apple MacBook5 */ 192 { /* Handle problems with rebooting on Apple MacBook5 */
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 54357a258b35..6ebc2098cfe1 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1611,7 +1611,12 @@ efi_status_t efi_setup_gop(efi_system_table_t *sys_table_arg,
1611 struct screen_info *si, efi_guid_t *proto, 1611 struct screen_info *si, efi_guid_t *proto,
1612 unsigned long size); 1612 unsigned long size);
1613 1613
1614bool efi_runtime_disabled(void); 1614#ifdef CONFIG_EFI
1615extern bool efi_runtime_disabled(void);
1616#else
1617static inline bool efi_runtime_disabled(void) { return true; }
1618#endif
1619
1615extern void efi_call_virt_check_flags(unsigned long flags, const char *call); 1620extern void efi_call_virt_check_flags(unsigned long flags, const char *call);
1616extern unsigned long efi_call_virt_save_flags(void); 1621extern unsigned long efi_call_virt_save_flags(void);
1617 1622