[PATCH] x86: Don't do the BIOS and PCI 0xCF9 reboot methods by default
From: Ingo Molnar
Date: Fri Apr 04 2014 - 03:54:10 EST
* Ingo Molnar <mingo@xxxxxxxxxx> wrote:
> Alternatively we could just use the following reboot order:
>
> * 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
> * 5) If still alive, call the EFI runtime service to reboot
> * 6) If still alive, force a triple fault
>
> I.e. eliminate the 'PCI' and 'BIOS' methods from our default
> sequence, as both are documented as being able to hang some boxes.
The patch below, on top of my first patch, does that.
Only lightly tested.
My expectation would be that Steve's box reboots fine by default with
the first patch already, and that it would still reboot fine with the
second patch applied as well.
Thanks,
Ingo
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 527dbcb..bd9b0ef 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -470,10 +470,10 @@ void __attribute__((weak)) mach_reboot_fixups(void)
*
* If the machine is still alive at this stage, it gives up.
*
- * We default to following the same pattern, except that we try
- * (7) [BIOS] before (6) [PCI], and we add 8): try to force a
- * triple fault and then cycle between hitting the keyboard
- * controller and doing that.
+ * We default to following the same pattern, except that after
+ * the 5) EFI reboot step we go straight to Linux specific
+ * step 8): try to force a triple fault and then cycle between
+ * hitting the keyboard controller and doing that.
*
* This means that this function can never return, it can misbehave
* by not rebooting properly and hanging.
@@ -525,7 +525,7 @@ static void native_machine_emergency_restart(void)
EFI_RESET_WARM :
EFI_RESET_COLD,
EFI_SUCCESS, 0, NULL);
- reboot_type = BOOT_BIOS;
+ reboot_type = BOOT_TRIPLE;
break;
case BOOT_BIOS:
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/