]> xenbits.xensource.com Git - xen.git/commitdiff
rombios: wait 30s after a failed boot
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 09:02:33 +0000 (10:02 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 8 Jul 2010 09:02:33 +0000 (10:02 +0100)
Prevents waiting forever for a keypress that may never come if boot is
unattended.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
xen-unstable changeset:   21746:3073d3d61a6b
xen-unstable date:        Thu Jul 08 09:46:09 2010 +0100

tools/firmware/rombios/rombios.c

index 1c05d99e75567f843c7ffa16ddf44877fa1c8fcd..3f85a902a665a5d8821cfcb25ed40efa485536ce 100644 (file)
@@ -8245,24 +8245,15 @@ Bit16u seq_nr;
     write_word(ebda_seg, IPL_SEQUENCE_OFFSET, 0xFFFF);
   } 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);
+    printf("Powering off in 30 seconds.\n");
 ASM_START
     sti
+    mov cx, #0x01c9
+    mov dx, #0xc380
+    mov ah, #0x86   ;; INT 15/86: wait CX:DX usec.
+    int #0x15
 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;
+    bios_printf(BIOS_PRINTF_HALT, "");
   }
 
   /* Translate from CMOS runes to an IPL table offset by subtracting 1 */