summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Harrison <dustin.harrison@sutus.com>2011-05-12 18:29:49 +0200
committerNoe Rubinstein <nrubinstein@proformatique.com>2011-06-23 10:38:59 +0200
commit07186a9f5375ec026350a97d9df35391b8120228 (patch)
treec2c9fd2bd4965563af7982021240d49ec9c075ed
parent88aae1ccf13fb79b8aa4b40a4ea3241057ccbe27 (diff)
Prevent hang on reboot by catching a soft reboot and then send a hard reboot.
Without this patch, issuing 'shutdown -r now' from a linux command line causes the BIOS to hang during resource allocation while reading resources. Signed-off-by: Dustin Harrison <dustin.harrison@sutus.com> ---
-rw-r--r--src/mainboard/intel/truxton/romstage.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mainboard/intel/truxton/romstage.c b/src/mainboard/intel/truxton/romstage.c
index b13ffc17c..c836b9c76 100644
--- a/src/mainboard/intel/truxton/romstage.c
+++ b/src/mainboard/intel/truxton/romstage.c
@@ -118,8 +118,18 @@ static void main(unsigned long bist)
if (bist == 0) {
/* Skip this if there was a built in self test failure */
early_mtrr_init();
- if (memory_initialized())
- skip_romstage();
+ if (memory_initialized()) {
+ /* Reboot doesn't work right now, so if we're rebooting
+ * force a HARD reboot by using the 0xe into CF9h
+ */
+ printk(BIOS_INFO, "Detected soft reboot: Issuing HARD reboot.\n");
+ outb(0xe, 0xCF9);
+ udelay(1);
+ printk(BIOS_INFO, "HARD reboot slow to respond! Re-issue HARD Reboot!\n");
+ outb(0xe, 0xCF9);
+ printk(BIOS_ERR, "Reboot failed!\n");
+ for (;;) asm("hlt");
+ }
}
/* Set up the console */