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

Re: [Xen-devel] PATCH: Add QEMU BIOS menu for choosing boot device

To: Xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] PATCH: Add QEMU BIOS menu for choosing boot device
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
Date: Wed, 02 Jan 2008 15:22:08 +0000
Cc: katzj@xxxxxxxxxx, keir.fraser@xxxxxxxxxx, berrange@xxxxxxxxxx
Delivery-date: Wed, 02 Jan 2008 07:23:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <DD74FBB8EE28D441903D56487861CD9D25CA8EF5@xxxxxxxxxxxxxxxxxxxxxx>
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <DD74FBB8EE28D441903D56487861CD9D25CA8EF5@xxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (X11/20071022)
If more than one boot device has been selected, the currently selected
number displayed in the menu is wrong.
The tiny patch I am attaching makes sure that only the first boot device
is considered.
The patch has to be applied on top of the original patch.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>

> The attached patch implements a mini BIOS menu for choosing a
> non-default boot device. When a guest starts it'll display 
> 
>    'Press F10 to select boot device'
> 
> And wait 3 seconds, before continuing with the normal boot device. If
> they press the F10 key, a menu is shown allowing a choice between
> floppy, harddisk, cdrom and network (PXE).
> 
> I can't take credit for this originally - Jeremy Katz wrote it for KVM,
> I merely re-diffed the patch to work against Xen's QEMU/BIOS code tree.
> It has been tested in Fedora successfully against 3.1.x and 3.2.x
> 
>    Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
>    CC: Jeremy Katz <katzj@xxxxxxxxxx>
> 


diff -r 4b278d3fc565 tools/firmware/rombios/rombios.c
--- a/tools/firmware/rombios/rombios.c  Wed Jan 02 15:06:13 2008 +0000
+++ b/tools/firmware/rombios/rombios.c  Wed Jan 02 15:07:22 2008 +0000
@@ -2146,6 +2146,7 @@ int bootmenu(selected)
     max = read_word(IPL_SEG, IPL_COUNT_OFFSET);
 
     for(;;) {
+        if (selected > max || selected < 1) selected = 1;
         clearscreen();
         bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "\n\n\n\n\n\n\n");
         bios_printf(BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO, "          Select 
boot device\n\n");
@@ -2223,7 +2224,7 @@ void interactive_bootkey()
         case 0x58:
             break;
         case 0x44:
-            scan = bootmenu(inb_cmos(0x3d));
+            scan = bootmenu(inb_cmos(0x3d) & 0x0f);
             break;
         default:
             scan = 0;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Xen-devel] PATCH: Add QEMU BIOS menu for choosing boot device, Stefano Stabellini <=