[LinuxBIOS] [Patch] Fix CONFIG_CONSOLE_VGA handling in default pci_dev_init.

Torsten Duwe duwe at lst.de
Wed Jan 2 20:37:43 CET 2008

Hi Luc, welcome to the List!

On Wednesday 02 January 2008, Luc Verhaegen wrote:
> src/devices/pci_device.c:pci_dev_init is messed up.

Well, it's not as clear as it could be, but I see no flaw so far.

Keep in mind the logic: CONFIG_PCI_ROM_RUN means run all PCI ROMs.
CONFIG_CONSOLE_VGA means console might be on VGA, run "the" VGA ROM 
_regardless_ of the setting of CONFIG_PCI_ROM_RUN.

> First of all, pci_dev_init should only do anything when the pci rom
> should be run.
Yes? As far as I can see  pci_rom_probe, pci_rom_load and run_bios are always 
run in sequence, unless there is an error.

> Secondly, vga_inited should only be set when the rom has 
> been run, and never otherwise as this should be done by the relevant
> init function of possible (future) VGA setup drivers.

Besides the fact that in case of multiple VGAs it is not possible to specify 
which one is the console, vga_inited is only set iff "the" VGA's ROM has been 

Your patch admittedly improves readability, but breaks the logic above.


More information about the coreboot mailing list