aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware/rombios
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-07-08 09:46:09 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-07-08 09:46:09 +0100
commitb825e251d26688e4843668a555221d4fbf1f114d (patch)
treeaaa73e01d6cccdb550f7eb9972e8e4cedf4513ce /tools/firmware/rombios
parent51d91a1c4305e43f1f929175b1c9828b61b992fe (diff)
downloadxen-b825e251d26688e4843668a555221d4fbf1f114d.tar.gz
xen-b825e251d26688e4843668a555221d4fbf1f114d.tar.bz2
xen-b825e251d26688e4843668a555221d4fbf1f114d.zip
rombios: wait 30s after a failed boot
Prevents waiting forever for a keypress that may never come if boot is unattended. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'tools/firmware/rombios')
-rw-r--r--tools/firmware/rombios/rombios.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/tools/firmware/rombios/rombios.c b/tools/firmware/rombios/rombios.c
index a73572399d..3de72cf9d1 100644
--- a/tools/firmware/rombios/rombios.c
+++ b/tools/firmware/rombios/rombios.c
@@ -8243,24 +8243,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 */