Re: [BUG] x86: reboot doesn't reboot

From: Li, Aubrey
Date: Thu Apr 03 2014 - 19:53:17 EST


On 2014/4/4 7:40, Steven Rostedt wrote:
> On Fri, 04 Apr 2014 07:23:32 +0800
> "Li, Aubrey" <aubrey.li@xxxxxxxxxxxxxxx> wrote:
>
>> Can you please send the dmi table out?
>
> I already did as a gz attachment to H. Peter. You were on the Cc, did
> you not receive it?
>
Oh, I got it. This is a Preproduction machine.
When reboot failed via a method (=e or =p), there are two case.

Case 1: this method do nothing, pass the attempt chance to the next method
Case 2: this method hangs the system

I want to know if CF9 is case 1 or case 2. Could you please try the following
patch *without* any reboot parameters?

(1) If we didn't see any string, then EFI hangs your box.
(2) if we see the first string but not the second one, CF9 hangs your box
(3) if we see both, couldn't be, because BIOS works on your box.

Thanks,
-Aubrey

diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 654b465..4de3027 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -547,11 +547,13 @@ static void native_machine_emergency_restart(void)
u8 reboot_code = reboot_mode == REBOOT_WARM ?
0x06 : 0x0E;
u8 cf9 = inb(0xcf9) & ~reboot_code;
+ pr_info("reboot via CF9...\n");
outb(cf9|2, 0xcf9); /* Request hard reset */
udelay(50);
/* Actually do the reset */
outb(cf9|reboot_code, 0xcf9);
udelay(50);
+ pr_info("reboot via CF9 done...\n");
}
reboot_type = BOOT_BIOS;
break;



--
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/