linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] x86: Introduce BOOT_EFI and BOOT_CF9 into the reboot sequence loop
@ 2014-02-28  4:11 Li, Aubrey
  2014-02-28  4:56 ` Matthew Garrett
  0 siblings, 1 reply; 46+ messages in thread
From: Li, Aubrey @ 2014-02-28  4:11 UTC (permalink / raw)
  To: alan, linux-kernel, H. Peter Anvin, Len.Brown, Adam Williamson

This patch is to introduce BOOT_EFI and BOOT_CF9 in the reboot sequence
loop, to fix the reboot problem on the known Intel Bay Trail-T based
platform, for example, ASUS-T100 and Dell Venue 8/11 Pro. These
platforms don't support ACPI reboot, we expect to call EFI runtime
service to handle this case, and CF9 is an alternate after EFI.

We don't need any dmidecode based quirks any more, we don't need extra
"reboot=efi" or "reboot=p" in the command line. The machine can be
rebooted automatically with the patch.

References: https://bugzilla.kernel.org/show_bug.cgi?id=70931
Signed-off-by Aubrey Li <aubrey.li@intel.com>
---
 arch/x86/kernel/reboot.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index c752cb4..1b58e00 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -462,11 +462,12 @@ void __attribute__((weak)) mach_reboot_fixups(void)
  *
  * 1) If the FADT has the ACPI reboot register flag set, try it
  * 2) If still alive, write to the keyboard controller
- * 3) If still alive, write to the ACPI reboot register again
- * 4) If still alive, write to the keyboard controller again
+ * 3) If still alive, call EFI runtime service
+ * 4) If still alive, write to the PCI IO port 0xCF9
+ * 5) If still alive, try (1)~(4) one time again
  *
  * If the machine is still alive at this stage, it gives up. We default to
- * following the same pattern, except that if we're still alive after
(4) we'll
+ * following the same pattern, except that if we're still alive after
(5) we'll
  * try to force a triple fault and then cycle between hitting the keyboard
  * controller and doing that
  */
@@ -500,7 +501,7 @@ static void native_machine_emergency_restart(void)
 			}
 			if (attempt == 0 && orig_reboot_type == BOOT_ACPI) {
 				attempt = 1;
-				reboot_type = BOOT_ACPI;
+				reboot_type = BOOT_EFI;
 			} else {
 				reboot_type = BOOT_TRIPLE;
 			}
@@ -530,7 +531,7 @@ static void native_machine_emergency_restart(void)
 						 EFI_RESET_WARM :
 						 EFI_RESET_COLD,
 						 EFI_SUCCESS, 0, NULL);
-			reboot_type = BOOT_KBD;
+			reboot_type = BOOT_CF9;
 			break;

 		case BOOT_CF9:
@@ -548,7 +549,7 @@ static void native_machine_emergency_restart(void)
 				outb(cf9|reboot_code, 0xcf9);
 				udelay(50);
 			}
-			reboot_type = BOOT_KBD;
+			reboot_type = BOOT_ACPI;
 			break;
 		}
 	}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2014-03-05 23:45 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-28  4:11 [patch] x86: Introduce BOOT_EFI and BOOT_CF9 into the reboot sequence loop Li, Aubrey
2014-02-28  4:56 ` Matthew Garrett
2014-02-28  5:22   ` Li, Aubrey
2014-02-28  5:56     ` Matthew Garrett
2014-02-28  6:07       ` Li, Aubrey
2014-02-28  6:12         ` Matthew Garrett
2014-02-28  6:20           ` Li, Aubrey
2014-02-28  6:23             ` Matthew Garrett
2014-02-28  6:39               ` Li, Aubrey
2014-02-28  6:44                 ` Matthew Garrett
2014-02-28  6:54                   ` Li, Aubrey
2014-02-28 17:47                     ` H. Peter Anvin
2014-02-28 22:11                       ` Li, Aubrey
2014-02-28 22:16                         ` Adam Williamson
2014-03-01 17:10                         ` Li, Aubrey
2014-03-01 17:22                           ` Matthew Garrett
2014-03-01 17:31                             ` Li, Aubrey
2014-03-01 18:19                               ` Matthew Garrett
2014-03-01 19:01                                 ` Matthew Garrett
2014-03-02  0:15                                   ` Li, Aubrey
2014-03-01 20:06                             ` H. Peter Anvin
2014-03-01 20:21                               ` Matthew Garrett
2014-03-01 20:26                                 ` H. Peter Anvin
2014-03-02  0:26                                   ` Li, Aubrey
2014-03-02  0:33                                     ` H. Peter Anvin
2014-03-02  1:47                                       ` Li, Aubrey
2014-03-02  2:07                                         ` H. Peter Anvin
2014-03-02  2:20                                           ` Li, Aubrey
2014-03-02  2:23                                           ` Matthew Garrett
2014-03-02  2:35                                             ` H. Peter Anvin
2014-03-02 10:39                                               ` Li, Aubrey
2014-03-02 16:52                                                 ` H. Peter Anvin
2014-03-02 22:13                                                   ` Li, Aubrey
2014-03-02 22:26                                                     ` Matthew Garrett
2014-03-02 22:45                                                       ` Li, Aubrey
2014-03-02 23:11                                                         ` Matthew Garrett
2014-03-02 23:23                                                           ` Li, Aubrey
2014-03-03  0:07                                                             ` Matthew Garrett
2014-03-03  0:18                                                               ` H. Peter Anvin
2014-03-03  1:36                                                                 ` Li, Aubrey
2014-03-03  1:47                                                                   ` H. Peter Anvin
2014-03-03  1:49                                                                     ` Li, Aubrey
2014-03-03 22:11                                                                       ` Li, Aubrey
2014-03-02 23:57                                                     ` H. Peter Anvin
2014-03-05 23:39                                                 ` [tip:x86/reboot] x86, reboot: Add EFI and CF9 reboot methods into the default list tip-bot for Li, Aubrey
2014-03-05 23:45                                                 ` [tip:x86/reboot] x86, reboot: Only use CF9_COND automatically, not CF9 tip-bot for H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).