[SeaBIOS] [Qemu-devel] [RFC] Passing boot order from qemu to seabios

Gleb Natapov gleb at redhat.com
Mon Oct 11 21:59:55 CEST 2010

On Mon, Oct 11, 2010 at 02:48:48PM -0500, Anthony Liguori wrote:
> On 10/11/2010 07:16 AM, Gleb Natapov wrote:
> >On Mon, Oct 11, 2010 at 02:07:14PM +0200, Gerd Hoffmann wrote:
> >>   Hi,
> >>
> >>>Floppy? Yes, I think we do.
> >>And *one* floppy controllers can actually have *two* drives
> >>connected, although booting from 'b' doesn't work IIRC.
> >>
> >>>>and since one PCI device may
> >>>>control more then one disk (ATA slave/master, SCSI LUNs). We can do what
> >>>>EDD specification does. Describe disk as:
> >>>>     bus type (isa/pci),
> >>>>     address on a bus (16 bit base address for isa, b/s/f for pci)
> >>>>     device type (ATA/SCSI/VIRTIO)
> >>>>     device path (slave/master for ATA, LUN for SCSI, nothing for virtio)
> >>>If we had a qdev ID for all devices (which I think we should have
> >>>anyway), would this work or is a string not really handy enough?
> >>I think we'll need support for that in all drivers supporting boot
> >>anyway, i.e. have virtio-blk-pci register a boot edd when configured
> >>that way.  Question is how to configure this.  We could attach the
> >>boot index to either the blockdev or the device, i.e.
> >>
> >>   -blockdev foo,bootindex=1
> >>
> >>or
> >>
> >>   -device virtio-blk-pci,bootindex=1
> >>
> >>The latter looks more useful to me, boot order is guest state imho,
> >>also it might expand to PXE booting nicely, i.e.
> >>
> >>   -device e1000,bootindex=2
> >>
> >Yes, boot order is a guest sate managed by BIOS on real HW.
> It's not that simple.  On advanced platforms, the boot order can be
> stored outside of the BIOS.  For instance, the boot order is
> actually stored in the IMM on certain IBM platforms and the BIOS
> queries the IMM for the boot order.  This allows out-of-band
> management tools to alter the boot order.

> This is more or less what we're looking for here.  The BIOS should
> be able to query and modify the boot order but this is something
> that ideally belongs in QEMU.
> >>Which turns up the question how this plays with option roms.
> >>seabios should be able to order at pci device level at least when
> >>booting via (pci) option rom.  OK for nics.  Booting from a scsi
> >>disk with id != 0 using the lsi rom is probably impossible though.
> >>
> >>What about non-pci option roms?  The one used for -kernel for example?
> >>
> >-option-rom rom.bin,bootindex=3?
> >
> >We can pass boot index along with option rom via fw_cfg interface.
> If the option rom is just hijacking int19, then there is no
> meaningful order you can give it.

No boot rom should do that. extboot wreaks havoc when it is used.
And since virtio is now supported by bios there is no reason to use it.
Whoever needs scsi boot should add it to seabios too.


More information about the SeaBIOS mailing list