[SeaBIOS] [PATCH] create separate IPL entry for each CD/DVD

Gleb Natapov gleb at redhat.com
Tue Dec 7 10:52:46 CET 2010


On Mon, Dec 06, 2010 at 07:53:27PM -0500, Kevin O'Connor wrote:
> On Mon, Dec 06, 2010 at 03:41:05PM +0200, Gleb Natapov wrote:
> > Current code creates only one IPL entry of type IPL_TYPE_CDROM even if
> > there are more then one CDROM drive present. If CDROM that the entry
> > refers to is not bootable there is no way to retry boot from another
> > CDROM. Fix this by creating IPL entry for each CDROM drive found. First
> > CDROM will always be placed in IPL entry 3 for backwards compatibility.
> [...]
> > +    /* put first cdrom into ipl 3 for compatability with qemu */
> > +    struct ipl_entry_s *ie = &IPL.bev[2];
> > +    if (IPL.bevcount >= ARRAY_SIZE(IPL.bev) && ie->vector)
> > +        return;
> 
> That's pretty ugly - though I don't have a better suggestion.
> 
I hope to get rid of it with boot order work :).

> [...]
> > @@ -399,9 +417,14 @@ boot_cdrom(struct ipl_entry_s *ie)
> >  {
> >      if (! CONFIG_CDROM_BOOT)
> >          return;
> > -    int status = cdrom_boot(ie->subchoice);
> > +
> > +    if (!ie->vector)
> > +        return;
> > +
> > +    struct drive_s *drive_g = GLOBALFLAT2GLOBAL((void*)ie->vector);
> 
> FYI - this code is always run in 32bit mode, so you don't need
> GLOBALFLAT2GLOBAL().
> 
Cool. int18/19 run in 32bit mode!

> The patch looks okay to me.
I think cbfs should receive similar treatment. I can't run coreboot to
do it though.

--
			Gleb.



More information about the SeaBIOS mailing list