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

Luc Verhaegen libv at skynet.be
Thu Jan 3 09:21:25 CET 2008

On Wed, Jan 02, 2008 at 05:31:27PM -0800, ron minnich wrote:
> On Jan 2, 2008 5:03 PM, Luc Verhaegen <libv at skynet.be> wrote:
> > What i am trying to do is implement native VGA bring-up for unichrome. I
> > have had userspace code doing this on top of a clean linuxbios for more
> > than 8 months. This is not just my X driver, i can also set up standard
> > vga text mode, so it is not a pipe dream.
> That's great to hear. Be aware that SiS also did native vga text mode
> in 2000, by Ollie Lo. So, we know that it is possible to have this
> work. We have done a fair amount of native and emulated VGA bringup
> over the years.

Where did this code go?

> > In that light it is perfectly valid to claim CONFIG_CONSOLE_VGA
> > without setting CONFIG_PCI_ROM_RUN, because:
> > * i have no need for a vga rom, as i provide the necessary code for a
> >   full vga text mode bringup myself.
> > * i have no need to run any other rom either.
> > * i do want vga console logging.
> >
> Ah. Now I see what you are trying to do. I misunderstood from your
> first message. No argument. We've been doing this for years. And if
> you can't do it, then something is broken for sure. So I'm happy to
> see it fixed.
> At the same time, let's suppose for the sake of argument that you set
> hardware bringup. How does that hurt your native device?

It doesn't, except that it makes this whole exercise rather useless. 
What point is there in a fully free bios when one still uselessly 
includes emulator code?

> There's no
> option rom for it --> it won't be run. I'd like to understand this. We
> have had cases where people had native bringup and installed a vga
> card, and both were needed. In that case we would want roms to run.

What about providing both CONFIG_PCI_ROM_RUN and CONFIG_CONSOLE_VGA, at 
the same time?

In the case a standalone card is used, the target Config.lb should have 
CONFIG_PCI_ROM_RUN. But it should never be forced by the motherboard or 
a device Config.lb when not needed.

> > So when i initialise the unichrome, i set vga_inited myself, like any
> > device driver should when it initialises a vga compatible device to a
> > vga compatible state and expects the console code to make use of it as a
> > vga compatible console.
> OK. It's fine to set it there I suppose.

Why "I suppose"?

vga_inited is from the console code. We are currently only setting it, 
as an extern, in the device code. What could stop anyone from setting it 
in any other code?

> It was considered. I think there is a bigger picture than you might
> have realised. Torsten also pointed out a secondary issue.

CONFIG_CONSOLE_VGA is not the right solution in that case. Maybe 
CONFIG_VGA_ROM_RUN should be trivially introduced.

> I read your patch. I am still unsure of the case where there are vga
> class devices but we don't want a vga console (hint: GPU computing).

As one of the main radeonhd driver developers, i am rather acutely aware
of gpgpu. But i fail to see the relevance of this here.

> It seems there is no way in your code to allow us to run the option
> ROMs for a "vga" device and not enable a vga console.

My patch allows this in the exact same manner as before. Please look at 
the resulting code.

The real question is:
What happens the unerring linuxbios user only specificies only 
CONFIG_CONSOLE_VGA, and still expects it to work with a vga rom. But 
this is a purely an issue of bad former practice and bad documentation. 

Both options should be specified if both are needed.

> This is a cooperative project and some patience from all sides is
> important. So please bear with us as we try to make sure we understand
> your needs and what you are doing. Very trivial changes can turn into
> problems in ways we do not expect, and VGA and ROM issues have been a
> headache.


Luc Verhaegen.

More information about the coreboot mailing list