From: Tim Deegan Subject: Re: [PATCH] rombios: pause for a keypress after a failedboot Date: Wed, 7 Jul 2010 10:49:07 +0100 Message-ID: <20100707094907.GS31695@whitby.uk.xensource.com> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Zs/RYxT/hKAHzkfQ" Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: James Harper , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org --Zs/RYxT/hKAHzkfQ Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline At 07:26 +0100 on 07 Jul (1278487607), Keir Fraser wrote: > > That's a great idea for many situations, but not for all. If the DomU > > fails to boot (eg because the drbd backing store is offline or > > something) it would be nice to have the domain exit so that monitoring > > can kick in and alert someone, rather than it just sitting there in a > > running state waiting for user input that might never come. > > > > I know it's probably a heap more work, but could the behaviour be driven > > by a config file setting? Otherwise this new behaviour is going to be a > > regression. > > Simply pausign for a few seconds might be nice. Gives enough time for a user > to see what is going on, but doesn't leave an unattended VM hanging around > forever? That's easy enough. The attached patch makes it wait 30 seconds before shutting down instead. (It applies on top of my original patch). Signed-off-by: Tim Deegan Tim. -- Tim Deegan Principal Software Engineer, XenServer Engineering Citrix Systems UK Ltd. (Company #02937203, SL9 0BG) --Zs/RYxT/hKAHzkfQ Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: attachment; filename="bios-delay" diff -r a0f0ae5be814 tools/firmware/rombios/rombios.c --- a/tools/firmware/rombios/rombios.c Tue Jul 06 17:58:37 2010 +0100 +++ b/tools/firmware/rombios/rombios.c Wed Jul 07 10:47:54 2010 +0100 @@ -8243,24 +8243,15 @@ 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 -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; + mov cx, #0x01c9 + mov dx, #0xc380 + mov ah, #0x86 ;; INT 15/86: wait CX:DX usec. + int #0x15 +ASM_END + bios_printf(BIOS_PRINTF_HALT, ""); } /* Translate from CMOS runes to an IPL table offset by subtracting 1 */ --Zs/RYxT/hKAHzkfQ Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Zs/RYxT/hKAHzkfQ--