* [Qemu-devel] vgabios + qemu: issues and plans.
@ 2010-05-05 13:38 Gerd Hoffmann
2010-05-05 19:56 ` [Qemu-devel] " Sebastian Herbszt
2010-05-06 10:03 ` [Qemu-devel] " Isaku Yamahata
0 siblings, 2 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2010-05-05 13:38 UTC (permalink / raw)
To: qemu-devel@nongnu.org; +Cc: info
Hi,
Today we have two vgabios versions in qemu: The standard one
(vgabios.bin) and the cirrus one (vgabios-cirrus.bin).
The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM
PCI bar. The vgabios checks the pci config space to figure where the
linear framebuffer (for vesa graphics) is mapped to. It knows how to
program the cirrus.
The standard bios isn't a PCI ROM. We have to load it using the seabios
firmware interface. It expects to find the linear framebuffer at the
magic address 0xe0000000. It uses the bochs extentions to implement
vesa graphics support.
So, what is wrong with this?
First, I'd like to be able to load the vgabios via PCI ROM bar on all
pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has to
match the PCI ID of the card, so we'll need a bunch of vga bios
binaries, all identical except for the PCI ID. Or we need some kind of
binary patching. Otherwise seabios will not load them from the PCI ROM bar.
Second, I want to get rid of the magic address 0xe0000000 (except for
isa-vga). This is basically just a matter of updating to vgabios
version 0.6c. And this needs one vga bios binary per vga card too as
the PCI ID is used to lookup the card (and then the framebuffer address)
in PCI config space.
Comments? Especially on the binary patching? Worth it? Or just build
a bunch of binaries? They are not *that* big after all ...
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-05 13:38 [Qemu-devel] vgabios + qemu: issues and plans Gerd Hoffmann
@ 2010-05-05 19:56 ` Sebastian Herbszt
2010-05-06 9:35 ` Gerd Hoffmann
2010-05-06 10:03 ` [Qemu-devel] " Isaku Yamahata
1 sibling, 1 reply; 10+ messages in thread
From: Sebastian Herbszt @ 2010-05-05 19:56 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: info, qemu-devel
Gerd Hoffmann wrote:
> Hi,
>
> Today we have two vgabios versions in qemu: The standard one
> (vgabios.bin) and the cirrus one (vgabios-cirrus.bin).
>
> The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM
> PCI bar. The vgabios checks the pci config space to figure where the
> linear framebuffer (for vesa graphics) is mapped to. It knows how to
> program the cirrus.
>
> The standard bios isn't a PCI ROM. We have to load it using the seabios
> firmware interface. It expects to find the linear framebuffer at the
> magic address 0xe0000000. It uses the bochs extentions to implement
> vesa graphics support.
>
> So, what is wrong with this?
>
> First, I'd like to be able to load the vgabios via PCI ROM bar on all
> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has to
> match the PCI ID of the card, so we'll need a bunch of vga bios
> binaries, all identical except for the PCI ID. Or we need some kind of
> binary patching. Otherwise seabios will not load them from the PCI ROM bar.
vgabios could be build multiple times with PCIBIOS set and VENDOR_ID and
DEVICE_ID supplied from the Makefile like it's already done with VGABIOS_DATE.
> Second, I want to get rid of the magic address 0xe0000000 (except for
> isa-vga). This is basically just a matter of updating to vgabios
> version 0.6c. And this needs one vga bios binary per vga card too as
> the PCI ID is used to lookup the card (and then the framebuffer address)
> in PCI config space.
>
> Comments? Especially on the binary patching? Worth it? Or just build
> a bunch of binaries? They are not *that* big after all ...
Few more bios binaries should do no harm. This is currently used for eepro100
(gpxe-eepro100-80861209.rom and gpxe-eepro100-80861229.rom). So maybe
define a similar naming convention for the vgabios.
Sebastian
> cheers,
> Gerd
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-05 19:56 ` [Qemu-devel] " Sebastian Herbszt
@ 2010-05-06 9:35 ` Gerd Hoffmann
2010-05-06 18:09 ` Sebastian Herbszt
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2010-05-06 9:35 UTC (permalink / raw)
To: Sebastian Herbszt; +Cc: qemu-devel
Hi,
>> First, I'd like to be able to load the vgabios via PCI ROM bar on all
>> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has
>> to match the PCI ID of the card, so we'll need a bunch of vga bios
>> binaries, all identical except for the PCI ID. Or we need some kind of
>> binary patching. Otherwise seabios will not load them from the PCI ROM
>> bar.
>
> vgabios could be build multiple times with PCIBIOS set and VENDOR_ID and
> DEVICE_ID supplied from the Makefile like it's already done with
> VGABIOS_DATE.
Yes, something like this I have in mind.
Works for stdvga and qxl. vmware fails as it has the memory at pci
region 1 (region 0 has ioports) and it seems vgabios isn't prepared to
handle that ...
Anyone knows what the best place to send patches to is?
vgabios-developers list @ savannah looks pretty much dead. It has one
(!) message in 2009 which is an unanswered question.
Or is upstream dead anyway and we should just go with
http://git.qemu.org/vgabios.git/ ?
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] vgabios + qemu: issues and plans.
2010-05-05 13:38 [Qemu-devel] vgabios + qemu: issues and plans Gerd Hoffmann
2010-05-05 19:56 ` [Qemu-devel] " Sebastian Herbszt
@ 2010-05-06 10:03 ` Isaku Yamahata
2010-05-06 11:08 ` Gerd Hoffmann
1 sibling, 1 reply; 10+ messages in thread
From: Isaku Yamahata @ 2010-05-06 10:03 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: info, qemu-devel@nongnu.org
On Wed, May 05, 2010 at 03:38:21PM +0200, Gerd Hoffmann wrote:
> Hi,
>
> Today we have two vgabios versions in qemu: The standard one
> (vgabios.bin) and the cirrus one (vgabios-cirrus.bin).
>
> The cirrus vgabios is a PCI ROM. We can (and do) load it into the ROM
> PCI bar. The vgabios checks the pci config space to figure where the
> linear framebuffer (for vesa graphics) is mapped to. It knows how to
> program the cirrus.
>
> The standard bios isn't a PCI ROM. We have to load it using the seabios
> firmware interface. It expects to find the linear framebuffer at the
> magic address 0xe0000000. It uses the bochs extentions to implement
> vesa graphics support.
>
> So, what is wrong with this?
>
> First, I'd like to be able to load the vgabios via PCI ROM bar on all
> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has to
> match the PCI ID of the card, so we'll need a bunch of vga bios
> binaries, all identical except for the PCI ID. Or we need some kind of
> binary patching. Otherwise seabios will not load them from the PCI ROM
> bar.
Make vga bios aware of all ids?
Then single vga bios image can handle all vga devices.
If new device is introduced (qxl), new id will be added to id table
I thing that adding a new vga device is rare.
Or do you want to more generic/dynamic solution?
> Second, I want to get rid of the magic address 0xe0000000 (except for
> isa-vga). This is basically just a matter of updating to vgabios
> version 0.6c. And this needs one vga bios binary per vga card too as
> the PCI ID is used to lookup the card (and then the framebuffer address)
> in PCI config space.
I also want to eliminate the magic number.
Boch vga bios is paravirtualized to get VBE address dynamically via a new
pci device with special pci device of device id 0x1234.
Are you meaning to follow bochs way?
Or how about to use qemu fw interface to get the address dynamically?
>
> Comments? Especially on the binary patching? Worth it? Or just build
> a bunch of binaries? They are not *that* big after all ...
>
> cheers,
> Gerd
>
>
--
yamahata
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] vgabios + qemu: issues and plans.
2010-05-06 10:03 ` [Qemu-devel] " Isaku Yamahata
@ 2010-05-06 11:08 ` Gerd Hoffmann
2010-05-06 18:23 ` [Qemu-devel] " Sebastian Herbszt
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2010-05-06 11:08 UTC (permalink / raw)
To: Isaku Yamahata; +Cc: info, qemu-devel@nongnu.org
>> First, I'd like to be able to load the vgabios via PCI ROM bar on all
>> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has to
>> match the PCI ID of the card, so we'll need a bunch of vga bios
>> binaries, all identical except for the PCI ID. Or we need some kind of
>> binary patching. Otherwise seabios will not load them from the PCI ROM
>> bar.
>
> Make vga bios aware of all ids?
Would work for the code doing the lfb address lookup. But I don't think
the PCI option rom header allows multiple entries.
> I also want to eliminate the magic number.
> Boch vga bios is paravirtualized to get VBE address dynamically via a new
> pci device with special pci device of device id 0x1234.
0x1234 happens to be the vendor id the qemu stdvga has. Probably the
same is true for bochs. So this code actually looks up the emulated vga
card ;)
> Are you meaning to follow bochs way?
Yes.
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-06 9:35 ` Gerd Hoffmann
@ 2010-05-06 18:09 ` Sebastian Herbszt
2010-05-06 19:37 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Herbszt @ 2010-05-06 18:09 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Gerd Hoffmann wrote:
> Hi,
>
>>> First, I'd like to be able to load the vgabios via PCI ROM bar on all
>>> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has
>>> to match the PCI ID of the card, so we'll need a bunch of vga bios
>>> binaries, all identical except for the PCI ID. Or we need some kind of
>>> binary patching. Otherwise seabios will not load them from the PCI ROM
>>> bar.
>>
>> vgabios could be build multiple times with PCIBIOS set and VENDOR_ID and
>> DEVICE_ID supplied from the Makefile like it's already done with
>> VGABIOS_DATE.
>
> Yes, something like this I have in mind.
>
> Works for stdvga and qxl. vmware fails as it has the memory at pci
> region 1 (region 0 has ioports) and it seems vgabios isn't prepared to
> handle that ...
Do you mean vgabios currently doesn't work with qemu and "-vga vmware" ?
> Anyone knows what the best place to send patches to is?
> vgabios-developers list @ savannah looks pretty much dead. It has one
> (!) message in 2009 which is an unanswered question.
>
> Or is upstream dead anyway and we should just go with
> http://git.qemu.org/vgabios.git/ ?
>From the "amount" of messages on the mailing list i conclude vgabios
just works good enough for most people. I would not say the developement
is dead, but event driven and there is no itch to strach at the moment.
Try sending patches to the mailing list and/or the vgabios home at
http://savannah.nongnu.org/projects/vgabios .
Sebastian
> cheers,
> Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-06 11:08 ` Gerd Hoffmann
@ 2010-05-06 18:23 ` Sebastian Herbszt
0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Herbszt @ 2010-05-06 18:23 UTC (permalink / raw)
To: Gerd Hoffmann, Isaku Yamahata; +Cc: info, qemu-devel
Gerd Hoffmann wrote:
>>> First, I'd like to be able to load the vgabios via PCI ROM bar on all
>>> pci vga cards (stdvga, vmware, soon qxl). The PCI ID in the bios has to
>>> match the PCI ID of the card, so we'll need a bunch of vga bios
>>> binaries, all identical except for the PCI ID. Or we need some kind of
>>> binary patching. Otherwise seabios will not load them from the PCI ROM
>>> bar.
>>
>> Make vga bios aware of all ids?
>
> Would work for the code doing the lfb address lookup. But I don't think
> the PCI option rom header allows multiple entries.
AFAIK it does not, but you can put multiple PCI option roms (concatenated)
on the BAR (see "6.3.1. PCI Expansion ROM Contents").
>> I also want to eliminate the magic number.
>> Boch vga bios is paravirtualized to get VBE address dynamically via a new
>> pci device with special pci device of device id 0x1234.
>
> 0x1234 happens to be the vendor id the qemu stdvga has. Probably the
> same is true for bochs. So this code actually looks up the emulated vga
> card ;)
Bochs and qemu use 0x1234:0x1111.
Sebastian
>> Are you meaning to follow bochs way?
>
> Yes.
>
> cheers,
> Gerd
>
>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-06 18:09 ` Sebastian Herbszt
@ 2010-05-06 19:37 ` Gerd Hoffmann
2010-05-06 20:19 ` Sebastian Herbszt
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2010-05-06 19:37 UTC (permalink / raw)
To: Sebastian Herbszt; +Cc: qemu-devel
Hi,
>> Works for stdvga and qxl. vmware fails as it has the memory at pci
>> region 1 (region 0 has ioports) and it seems vgabios isn't prepared to
>> handle that ...
>
> Do you mean vgabios currently doesn't work with qemu and "-vga vmware" ?
It works, but uses the bochs lfb at the magic address 0xe0000000.
Killing the 0xe000000 alias mapping and switching over to use the pci
region instead requires some changes in pci_get_lfb_addr to handle the
situation.
> Try sending patches to the mailing list and/or the vgabios home at
> http://savannah.nongnu.org/projects/vgabios .
Ok, I'll try to send my patch series down that route.
thanks,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-06 19:37 ` Gerd Hoffmann
@ 2010-05-06 20:19 ` Sebastian Herbszt
2010-05-06 20:27 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Herbszt @ 2010-05-06 20:19 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
Gerd Hoffmann wrote:
> Hi,
>
>>> Works for stdvga and qxl. vmware fails as it has the memory at pci
>>> region 1 (region 0 has ioports) and it seems vgabios isn't prepared to
>>> handle that ...
>>
>> Do you mean vgabios currently doesn't work with qemu and "-vga vmware" ?
>
> It works, but uses the bochs lfb at the magic address 0xe0000000.
>
> Killing the 0xe000000 alias mapping and switching over to use the pci
> region instead requires some changes in pci_get_lfb_addr to handle the
> situation.
Does this only happen with VBE?
Sebastian
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Qemu-devel] Re: vgabios + qemu: issues and plans.
2010-05-06 20:19 ` Sebastian Herbszt
@ 2010-05-06 20:27 ` Gerd Hoffmann
0 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2010-05-06 20:27 UTC (permalink / raw)
To: Sebastian Herbszt; +Cc: qemu-devel
On 05/06/10 22:19, Sebastian Herbszt wrote:
> Gerd Hoffmann wrote:
>> Hi,
>>
>>>> Works for stdvga and qxl. vmware fails as it has the memory at pci
>>>> region 1 (region 0 has ioports) and it seems vgabios isn't prepared to
>>>> handle that ...
>>>
>>> Do you mean vgabios currently doesn't work with qemu and "-vga vmware" ?
>>
>> It works, but uses the bochs lfb at the magic address 0xe0000000.
>>
>> Killing the 0xe000000 alias mapping and switching over to use the pci
>> region instead requires some changes in pci_get_lfb_addr to handle the
>> situation.
>
> Does this only happen with VBE?
Yes.
cheers,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2010-05-06 20:27 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-05 13:38 [Qemu-devel] vgabios + qemu: issues and plans Gerd Hoffmann
2010-05-05 19:56 ` [Qemu-devel] " Sebastian Herbszt
2010-05-06 9:35 ` Gerd Hoffmann
2010-05-06 18:09 ` Sebastian Herbszt
2010-05-06 19:37 ` Gerd Hoffmann
2010-05-06 20:19 ` Sebastian Herbszt
2010-05-06 20:27 ` Gerd Hoffmann
2010-05-06 10:03 ` [Qemu-devel] " Isaku Yamahata
2010-05-06 11:08 ` Gerd Hoffmann
2010-05-06 18:23 ` [Qemu-devel] " Sebastian Herbszt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).