qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Jordan Justen <jljusten@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] OVMF, SeaBIOS & non-CSM based legacy boot
Date: Tue, 22 Mar 2011 22:07:20 +0200	[thread overview]
Message-ID: <20110322200720.GA16147@redhat.com> (raw)
In-Reply-To: <AANLkTinqFCMuCkUB85QP4UfxtsiY8BoG0SEmxQhC2w9E@mail.gmail.com>

On Tue, Mar 22, 2011 at 12:28:51PM -0700, Jordan Justen wrote:
> 2011/3/22 Gleb Natapov <gleb@redhat.com>:
> > On Mon, Mar 21, 2011 at 02:23:31PM -0700, Jordan Justen wrote:
> >> There is one big difference here between how VM's generally specify
> >> the boot disk vs. a UEFI system.  In a UEFI system, normally the boot
> >> path is not known during the first boot of the machine.  At some point
> >> the boot path will be programmed into a non-volatile variable.  Often
> >> this will be written by the OS installer.
> > QEMU may pass boot path to UEFI. Qemu encodes it as Open Firmware device
> > path. Examples are:
> > /pci@i0cf8/ide@1,1/drive@1/disk@0
> 
> Can this cover a full path like this?
> /pci@i0cf8/ide@1,1/drive@1/disk@0 => partition0 => /path/abc.efi
> 
Open Firmware have syntax for that. /pci@i0cf8/ide@1,1/drive@1/disk@0:0,/path/abc.efi
But QEMU has no way to know how to specify those additional
parameters. With legacy BIOS each HD has only one boot method.

> >> The point is, normally an 'outside mechanism' like '-boot ?' is not
> >> present.  If the user wants to alter the boot order, they can by
> >> pressing a key during the firmware boot process.
> >>
> >> Also, -boot does map very well to UEFI in a lot of cases.  For
> >> example, boot option 1 in a UEFI system may be something like
> >> /dev/sda1:/efi/boot/ubuntu.efi and option 2 could be
> >> /dev/sda1:/efi/boot/fedora.efi.
> >>
> >> Right now, OVMF doesn't support the qemu -boot parameter...
> >>
> > It should. Otherwise this is a regression from the current behaviour. But
> > the new way to specify boot order is using bootindex not '-boot', so you
> > better support that.
> 
> (Where can I learn more about bootindex?)
It is a device property which is used to set boot priority for a device.
For each device that have this property set QEMU generates device path
and pass it into a firmware along with its boot priority.

> 
> I agree, but the mapping is not 100% right now.  '-boot c' does not
> quite make sense for UEFI, for example.  For floppies or CD's there is
> the concept of a default path: /efi/boot/bootia32.efi or
> /efi/boot/bootx64.efi, but this doesn't apply to hard disks, and you
> need to know the path to the image to load off that hard disk.
Looks like UEFI tries to be second stage boot loader too. Given device
path that points to HD can OVMF scan it for common locations where OSes
usually install .efi files and boot the first one it finds?

> 
> Also, could QEMU support one mode where the boot device is specified,
> and the firmware would know that an override was provided for the boot
> path, and another mode where it is not specified, and we can look at
> the boot variables?
> 
That what QEMU does today. It either supplies boot order information or
leaves it to firmware to decide where to boot from, or tells firmware to
present user with boot menu.

--
			Gleb.

  reply	other threads:[~2011-03-22 20:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-21 18:14 [Qemu-devel] OVMF, SeaBIOS & non-CSM based legacy boot Jordan Justen
2011-03-21 18:27 ` Anthony Liguori
2011-03-21 21:06   ` Stefan Hajnoczi
2011-03-21 21:17     ` Michael Brown
2011-03-21 21:31       ` Jordan Justen
2011-03-21 21:40       ` Stefan Hajnoczi
2011-03-21 23:14         ` Michael Brown
2011-03-21 21:23   ` Jordan Justen
2011-03-22  8:00     ` Gleb Natapov
2011-03-22 19:28       ` Jordan Justen
2011-03-22 20:07         ` Gleb Natapov [this message]
2011-03-22 21:53           ` Jordan Justen
2011-03-23 12:36             ` Gleb Natapov
2011-03-23 22:32               ` Jordan Justen
2011-03-24 11:53                 ` Gleb Natapov
2011-03-24 16:46                   ` Jordan Justen
2011-03-24 18:36                     ` Gleb Natapov
2011-03-24 12:27                 ` Michal Suchanek
2011-03-24 13:44                   ` Gleb Natapov

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=20110322200720.GA16147@redhat.com \
    --to=gleb@redhat.com \
    --cc=jljusten@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /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).