qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin O'Connor <kevin@koconnor.net>
To: Gleb Natapov <gleb@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	seabios@seabios.org, Avi Kivity <avi@redhat.com>,
	kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [SeaBIOS] [PATCHv2] Support for booting from virtio disks
Date: Tue, 11 May 2010 20:44:25 -0400	[thread overview]
Message-ID: <20100512004425.GA2764@morn.localdomain> (raw)
In-Reply-To: <20100511124740.GN2504@redhat.com>

On Tue, May 11, 2010 at 03:47:40PM +0300, Gleb Natapov wrote:
> On Tue, May 11, 2010 at 08:45:29AM -0400, Kevin O'Connor wrote:
> > On Tue, May 11, 2010 at 10:04:25AM +0100, Stefan Hajnoczi wrote:
> > > From what I can tell SeaBIOS is reading CMOS_BIOS_BOOTFLAG1 and
> > > CMOS_BIOS_BOOTFLAG2 from non-volatile memory.  The values index into
> > > bev[], which contains IPL entries (the drives).
> > > 
> > > Is the order of bev[] entries well-defined?  Is there a way for QEMU
> > > command-line to know that the first virtio-blk device corresponds to x
> > > and the IDE CD-ROM corresponds to y?
> > 
> > SeaBIOS arranges for bev[0] = floppy, bev[1] = hd, bev[2] = cdrom, and
> > bev[3] to be the first network card - it does this so that the boot
> > order can be read from qemu.  However, it's a pain to force this
> > order.
> > 
> What if there are more then one disk?

It's possible to boot from the A drive (floppy) or the C drive (hd).
There's no standard way to boot from the D drive.  So, when booting
from the second hard drive, SeaBIOS arranges for that drive to be
mapped as the C drive.

The boot order (eg, floppy, hd, cdroms, network cards) is determined
by the BEV (Boot Execution Vector) list.  The harddrive registration
order (eg, C, D, E) is determined by the BCV (Boot Connection Vector)
list.

When one selects a hard drive in SeaBIOS' boot menu, SeaBIOS actually
does two things - it makes hd booting the first entry in the BEV list
and it makes the selected hd the first entry in the BCV list.

It's a mess - but that's what the BIOS Boot Specification (BBS)
defines.  Both option roms and bootloaders depend on this behavior.

-Kevin

  reply	other threads:[~2010-05-12  0:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-10  8:11 [Qemu-devel] [PATCHv2] Support for booting from virtio disks Gleb Natapov
2010-05-10  8:25 ` [Qemu-devel] " Stefan Hajnoczi
2010-05-10  8:29   ` Gleb Natapov
2010-05-10 15:48 ` Anthony Liguori
2010-05-10 15:54   ` Gleb Natapov
2010-05-10 15:58     ` Anthony Liguori
2010-05-10 16:09       ` Gleb Natapov
2010-05-13 16:49       ` [Qemu-devel] Re: [SeaBIOS] " Avi Kivity
2010-05-16  8:28         ` Gleb Natapov
2010-05-11  8:19   ` [Qemu-devel] " Avi Kivity
2010-05-11  9:04     ` Stefan Hajnoczi
2010-05-11 12:33       ` Gleb Natapov
2010-05-11 12:45       ` [Qemu-devel] Re: [SeaBIOS] " Kevin O'Connor
2010-05-11 12:47         ` Gleb Natapov
2010-05-12  0:44           ` Kevin O'Connor [this message]
2010-05-11 12:31     ` [Qemu-devel] " Gleb Natapov
2010-05-12  7:22       ` Avi Kivity
2010-05-12  7:55         ` Gleb Natapov
2010-05-12 12:57         ` Kevin O'Connor

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=20100512004425.GA2764@morn.localdomain \
    --to=kevin@koconnor.net \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    --cc=stefanha@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).