All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@citrix.com>
To: Xen-devel@lists.xensource.com
Cc: katzj@redhat.com, keir.fraser@citrix.com, berrange@redhat.com
Subject: Re: PATCH: Add QEMU BIOS menu for choosing boot device
Date: Wed, 02 Jan 2008 15:22:08 +0000	[thread overview]
Message-ID: <477BAC20.3090808@citrix.com> (raw)
In-Reply-To: <DD74FBB8EE28D441903D56487861CD9D25CA8EF5@lonpexch01.citrite.net>

[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]

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@citrix.com>

> 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@redhat.com>
>    CC: Jeremy Katz <katzj@redhat.com>
> 



[-- Attachment #2: xen-qemu-bootmenu-fix.patch --]
[-- Type: text/x-patch, Size: 833 bytes --]

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;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

       reply	other threads:[~2008-01-02 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DD74FBB8EE28D441903D56487861CD9D25CA8EF5@lonpexch01.citrite.net>
2008-01-02 15:22 ` Stefano Stabellini [this message]
2007-12-21 22:31 PATCH: Add QEMU BIOS menu for choosing boot device Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=477BAC20.3090808@citrix.com \
    --to=stefano.stabellini@citrix.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=berrange@redhat.com \
    --cc=katzj@redhat.com \
    --cc=keir.fraser@citrix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.