[SeaBIOS] [PATCH 1/6] pci, optionrom: enable non-vga display devices

Gerd Hoffmann kraxel at redhat.com
Fri Jun 1 09:18:13 CEST 2018


> > +    if (!have_vga) {
> > +        // no VGA, try fallback to display
> > +        dprintf(1, "no vga, try display\n");
> > +        foreachpci(pci) {
> > +            if (!is_pci_display_other(pci))
> > +                continue;
> > +            vgahook_setup(pci);
> > +            init_pcirom(pci, 1, NULL);
> > +            break;
> > +        }
> > +    }
> 
> Is the goal of this patch to bring up the display device early during
> boot?

Yes.

> If so, do we need to change pciinit.c?  Could we instead add:
>     if (!have_vga) try_setup_display_other();
> here and then let that function do all the work?

The only thing the pciinit patch effectively does (beside the printk) is
setting the PCI_COMMAND register.  We could do that elsewhere.  Either
the vgabios does it itself (are roms expected to do that?), or
try_setup_display_other() does it.

> Separately, I don't think we need to call vgahook_setup() if a real
> vga device wasn't found.

Indeed.

cheers,
  Gerd




More information about the SeaBIOS mailing list