WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] rombios: pause for a keypress after a failed boot

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] rombios: pause for a keypress after a failed boot
From: Tim Deegan <Tim.Deegan@xxxxxxxxxx>
Date: Tue, 6 Jul 2010 14:59:36 +0100
Delivery-date: Tue, 06 Jul 2010 07:01:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
rombios: inform the user and pause for a keypress after a failed boot
rather than powering off immediately. 

Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxx>

diff -r e8f6f9a86f55 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Tue Jul 06 14:30:39 2010 +0100
+++ b/tools/firmware/rombios/rombios.c  Tue Jul 06 14:42:04 2010 +0100
@@ -8243,7 +8243,27 @@
     write_word(ebda_seg, IPL_BOOTFIRST_OFFSET, 0xFFFF);
     /* Reset boot sequence */
     write_word(ebda_seg, IPL_SEQUENCE_OFFSET, 0xFFFF);
-  } else if (bootdev == 0) BX_PANIC("No bootable device.\n");
+  } else if (bootdev == 0) {
+    printf("\nNo bootable device.\n");
+    printf("Reboot or press any key to retry.");
+    write_word(ebda_seg, IPL_SEQUENCE_OFFSET, 0xFFFF);
+ASM_START
+    sti
+ASM_END
+    {
+      Bit8u sc, ac;
+      while(!dequeue_key(&sc, &ac, 1)) {
+ASM_START
+        hlt
+ASM_END
+      }
+    }
+ASM_START
+    cli
+ASM_END
+    printf("\n\n");
+    return;
+  }
 
   /* Translate from CMOS runes to an IPL table offset by subtracting 1 */
   bootdev -= 1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel