qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Standard vga breakage
@ 2009-11-15  1:25 malc
  2009-11-15 10:20 ` Blue Swirl
  0 siblings, 1 reply; 12+ messages in thread
From: malc @ 2009-11-15  1:25 UTC (permalink / raw)
  To: qemu-devel


debian-503-i386-netinst.iso when booted on a machine with `-vga std' just
shows black screen (after bios' setup screen)

Same issue was also present with cirrus vga until it was "fixed" by
91011d4f3b7c311a42b842f6682ac64a2372d2b7

I was unsuccessful in trying to bisect it.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15  1:25 [Qemu-devel] Standard vga breakage malc
@ 2009-11-15 10:20 ` Blue Swirl
  2009-11-15 15:22   ` malc
  0 siblings, 1 reply; 12+ messages in thread
From: Blue Swirl @ 2009-11-15 10:20 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel

On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
>
> debian-503-i386-netinst.iso when booted on a machine with `-vga std' just
> shows black screen (after bios' setup screen)

Just some observations:
- if you press enter, installer starts and Linux is able to fix the display
- the screen is fine with -bios pcbios.bin, so the issue is related to SeaBIOS

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 10:20 ` Blue Swirl
@ 2009-11-15 15:22   ` malc
  2009-11-15 15:28     ` Gleb Natapov
  0 siblings, 1 reply; 12+ messages in thread
From: malc @ 2009-11-15 15:22 UTC (permalink / raw)
  To: Blue Swirl; +Cc: qemu-devel

On Sun, 15 Nov 2009, Blue Swirl wrote:

> On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
> >
> > debian-503-i386-netinst.iso when booted on a machine with `-vga std' just
> > shows black screen (after bios' setup screen)
> 
> Just some observations:
> - if you press enter, installer starts and Linux is able to fix the display
> - the screen is fine with -bios pcbios.bin, so the issue is related to SeaBIOS

Yes i forgot to mention that -bios works, also worth noting is that before
the commit that fixed cirrus -bios hack also made it work.

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 15:22   ` malc
@ 2009-11-15 15:28     ` Gleb Natapov
  2009-11-15 15:40       ` malc
  0 siblings, 1 reply; 12+ messages in thread
From: Gleb Natapov @ 2009-11-15 15:28 UTC (permalink / raw)
  To: malc; +Cc: Blue Swirl, qemu-devel

On Sun, Nov 15, 2009 at 06:22:40PM +0300, malc wrote:
> On Sun, 15 Nov 2009, Blue Swirl wrote:
> 
> > On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
> > >
> > > debian-503-i386-netinst.iso when booted on a machine with `-vga std' just
> > > shows black screen (after bios' setup screen)
> > 
> > Just some observations:
> > - if you press enter, installer starts and Linux is able to fix the display
> > - the screen is fine with -bios pcbios.bin, so the issue is related to SeaBIOS
> 
> Yes i forgot to mention that -bios works, also worth noting is that before
> the commit that fixed cirrus -bios hack also made it work.
> 
What commit is this?

--
			Gleb.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 15:28     ` Gleb Natapov
@ 2009-11-15 15:40       ` malc
  2009-11-15 20:16         ` Stefan Weil
  0 siblings, 1 reply; 12+ messages in thread
From: malc @ 2009-11-15 15:40 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Blue Swirl, qemu-devel

On Sun, 15 Nov 2009, Gleb Natapov wrote:

> On Sun, Nov 15, 2009 at 06:22:40PM +0300, malc wrote:
> > On Sun, 15 Nov 2009, Blue Swirl wrote:
> > 
> > > On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
> > > >
> > > > debian-503-i386-netinst.iso when booted on a machine with `-vga std' just
> > > > shows black screen (after bios' setup screen)
> > > 
> > > Just some observations:
> > > - if you press enter, installer starts and Linux is able to fix the display
> > > - the screen is fine with -bios pcbios.bin, so the issue is related to SeaBIOS
> > 
> > Yes i forgot to mention that -bios works, also worth noting is that before
> > the commit that fixed cirrus -bios hack also made it work.
> > 
> What commit is this?

It was in original posting - 91011d4f3b7c311a42b842f6682ac64a2372d2b7

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 15:40       ` malc
@ 2009-11-15 20:16         ` Stefan Weil
  2009-11-15 20:37           ` Blue Swirl
                             ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Stefan Weil @ 2009-11-15 20:16 UTC (permalink / raw)
  To: malc; +Cc: Blue Swirl, qemu-devel, Gleb Natapov

malc schrieb:
> On Sun, 15 Nov 2009, Gleb Natapov wrote:
>
>> On Sun, Nov 15, 2009 at 06:22:40PM +0300, malc wrote:
>>> On Sun, 15 Nov 2009, Blue Swirl wrote:
>>>
>>>> On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
>>>>> debian-503-i386-netinst.iso when booted on a machine with `-vga
>>>>> std' just
>>>>> shows black screen (after bios' setup screen)
>>>> Just some observations:
>>>> - if you press enter, installer starts and Linux is able to fix the
>>>> display
>>>> - the screen is fine with -bios pcbios.bin, so the issue is related
>>>> to SeaBIOS
>>> Yes i forgot to mention that -bios works, also worth noting is that
>>> before
>>> the commit that fixed cirrus -bios hack also made it work.


Here is a summary of my analysis of this problem:

Graphics mode memory (ram 0xe0000000 ...) is not mapped
in QEMU address space (which results in unassigned
memory writes) for standard pci vga (-vga std), so users
don't get vga display output with grub (in graphical mode),
debian installer (in graphical mode) or similar boot software.

This happens for PC system emulation using SeaBIOS.
It won't happen when using Bochs BIOS.

Other system emulations which can run standard pci vga
seem to suffer from the same problem: when I run mips
malta using -vga std, it won't display anything on the vga
screen (it works with cirrus pci vga).

Malta has no vga bios, so the error might be in QEMU's
vga code (hw/vga-pci.c). Maybe wrong initial PCI mappings?
Maybe this has always be wrong (which would explain why
git bisect does not work).

pci_vga_init() is called by sun4u, ppc_prep, ppc_oldworld,
ppc_newworld, pc and mips, so all these emulations
share the same potential problem.

Bochs BIOS and PC Linux obviously fix the problem.

Regards,
Stefan

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 20:16         ` Stefan Weil
@ 2009-11-15 20:37           ` Blue Swirl
  2009-11-15 21:21           ` malc
  2009-11-16 19:12           ` Anthony Liguori
  2 siblings, 0 replies; 12+ messages in thread
From: Blue Swirl @ 2009-11-15 20:37 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-devel, Gleb Natapov

On Sun, Nov 15, 2009 at 10:16 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> malc schrieb:
>> On Sun, 15 Nov 2009, Gleb Natapov wrote:
>>
>>> On Sun, Nov 15, 2009 at 06:22:40PM +0300, malc wrote:
>>>> On Sun, 15 Nov 2009, Blue Swirl wrote:
>>>>
>>>>> On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
>>>>>> debian-503-i386-netinst.iso when booted on a machine with `-vga
>>>>>> std' just
>>>>>> shows black screen (after bios' setup screen)
>>>>> Just some observations:
>>>>> - if you press enter, installer starts and Linux is able to fix the
>>>>> display
>>>>> - the screen is fine with -bios pcbios.bin, so the issue is related
>>>>> to SeaBIOS
>>>> Yes i forgot to mention that -bios works, also worth noting is that
>>>> before
>>>> the commit that fixed cirrus -bios hack also made it work.
>
>
> Here is a summary of my analysis of this problem:
>
> Graphics mode memory (ram 0xe0000000 ...) is not mapped
> in QEMU address space (which results in unassigned
> memory writes) for standard pci vga (-vga std), so users
> don't get vga display output with grub (in graphical mode),
> debian installer (in graphical mode) or similar boot software.
>
> This happens for PC system emulation using SeaBIOS.
> It won't happen when using Bochs BIOS.
>
> Other system emulations which can run standard pci vga
> seem to suffer from the same problem: when I run mips
> malta using -vga std, it won't display anything on the vga
> screen (it works with cirrus pci vga).
>
> Malta has no vga bios, so the error might be in QEMU's
> vga code (hw/vga-pci.c). Maybe wrong initial PCI mappings?
> Maybe this has always be wrong (which would explain why
> git bisect does not work).
>
> pci_vga_init() is called by sun4u, ppc_prep, ppc_oldworld,
> ppc_newworld, pc and mips, so all these emulations
> share the same potential problem.

At least sun4u, ppc_oldworld and ppc_newworld are fine with -vga std.
There is no VGA BIOS.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 20:16         ` Stefan Weil
  2009-11-15 20:37           ` Blue Swirl
@ 2009-11-15 21:21           ` malc
  2009-11-15 21:35             ` Blue Swirl
  2009-11-16 18:21             ` Stefan Weil
  2009-11-16 19:12           ` Anthony Liguori
  2 siblings, 2 replies; 12+ messages in thread
From: malc @ 2009-11-15 21:21 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Blue Swirl, qemu-devel, Gleb Natapov

On Sun, 15 Nov 2009, Stefan Weil wrote:

> malc schrieb:
> > On Sun, 15 Nov 2009, Gleb Natapov wrote:

[..snip..]

> 
> Here is a summary of my analysis of this problem:
> 
> Graphics mode memory (ram 0xe0000000 ...) is not mapped
> in QEMU address space (which results in unassigned
> memory writes) for standard pci vga (-vga std), so users
> don't get vga display output with grub (in graphical mode),
> debian installer (in graphical mode) or similar boot software.
> 
> This happens for PC system emulation using SeaBIOS.
> It won't happen when using Bochs BIOS.
> 
> Other system emulations which can run standard pci vga
> seem to suffer from the same problem: when I run mips
> malta using -vga std, it won't display anything on the vga
> screen (it works with cirrus pci vga).
> 
> Malta has no vga bios, so the error might be in QEMU's
> vga code (hw/vga-pci.c). Maybe wrong initial PCI mappings?
> Maybe this has always be wrong (which would explain why
> git bisect does not work).

git bisect doesn't work because most of the time:

a. Compilation fails
b. Compilation succeeds but qemu segfaults before even trying to
   execute any guest code

> 
> pci_vga_init() is called by sun4u, ppc_prep, ppc_oldworld,
> ppc_newworld, pc and mips, so all these emulations
> share the same potential problem.
> 
> Bochs BIOS and PC Linux obviously fix the problem.
> 
> Regards,
> Stefan
> 

-- 
mailto:av1474@comtv.ru

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 21:21           ` malc
@ 2009-11-15 21:35             ` Blue Swirl
  2009-11-16 18:21             ` Stefan Weil
  1 sibling, 0 replies; 12+ messages in thread
From: Blue Swirl @ 2009-11-15 21:35 UTC (permalink / raw)
  To: malc; +Cc: qemu-devel, Gleb Natapov

On Sun, Nov 15, 2009 at 11:21 PM, malc <av1474@comtv.ru> wrote:
> On Sun, 15 Nov 2009, Stefan Weil wrote:
>
>> malc schrieb:
>> > On Sun, 15 Nov 2009, Gleb Natapov wrote:
>
> [..snip..]
>
>>
>> Here is a summary of my analysis of this problem:
>>
>> Graphics mode memory (ram 0xe0000000 ...) is not mapped
>> in QEMU address space (which results in unassigned
>> memory writes) for standard pci vga (-vga std), so users
>> don't get vga display output with grub (in graphical mode),
>> debian installer (in graphical mode) or similar boot software.
>>
>> This happens for PC system emulation using SeaBIOS.
>> It won't happen when using Bochs BIOS.
>>
>> Other system emulations which can run standard pci vga
>> seem to suffer from the same problem: when I run mips
>> malta using -vga std, it won't display anything on the vga
>> screen (it works with cirrus pci vga).
>>
>> Malta has no vga bios, so the error might be in QEMU's
>> vga code (hw/vga-pci.c). Maybe wrong initial PCI mappings?
>> Maybe this has always be wrong (which would explain why
>> git bisect does not work).
>
> git bisect doesn't work because most of the time:
>
> a. Compilation fails
> b. Compilation succeeds but qemu segfaults before even trying to
>   execute any guest code

With infinite time and resources, we could construct a fully
bisectable tree with the following properties:
- buggy commits (especially commits that break build or require manual
reconfiguration) are replaced with corrected commits by changing the
history
- no merges, linear history
- compound commits are broken down to simple, atomic versions
- documentation is added by the first commit to reduce the number of commits
- spelling fixes applied by changing history, not as a separate commit
- each commit should still have some relation to some real tree commit

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 21:21           ` malc
  2009-11-15 21:35             ` Blue Swirl
@ 2009-11-16 18:21             ` Stefan Weil
  1 sibling, 0 replies; 12+ messages in thread
From: Stefan Weil @ 2009-11-16 18:21 UTC (permalink / raw)
  To: malc; +Cc: Blue Swirl, qemu-devel, Gleb Natapov

malc schrieb:
> On Sun, 15 Nov 2009, Stefan Weil wrote:
>
>   
>> malc schrieb:
>>     
>>> On Sun, 15 Nov 2009, Gleb Natapov wrote:
>>>       
>
> [..snip..]
>
>   
>> Here is a summary of my analysis of this problem:
>>
>> Graphics mode memory (ram 0xe0000000 ...) is not mapped
>> in QEMU address space (which results in unassigned
>> memory writes) for standard pci vga (-vga std), so users
>> don't get vga display output with grub (in graphical mode),
>> debian installer (in graphical mode) or similar boot software.
>>
>> This happens for PC system emulation using SeaBIOS.
>> It won't happen when using Bochs BIOS.
>>
>> Other system emulations which can run standard pci vga
>> seem to suffer from the same problem: when I run mips
>> malta using -vga std, it won't display anything on the vga
>> screen (it works with cirrus pci vga).
>>
>> Malta has no vga bios, so the error might be in QEMU's
>> vga code (hw/vga-pci.c). Maybe wrong initial PCI mappings?
>> Maybe this has always be wrong (which would explain why
>> git bisect does not work).
>>     
>
> git bisect doesn't work because most of the time:
>
> a. Compilation fails
> b. Compilation succeeds but qemu segfaults before even trying to
>    execute any guest code
>   

I did git bisect: even very early versions (from 2006) of std vga had
the same kind of problem (no access to frame buffer at 0xe0000000)
when booted with SeaBIOS). It was not really a bisection, because
I never reached status "good".

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [Qemu-devel] Standard vga breakage
  2009-11-15 20:16         ` Stefan Weil
  2009-11-15 20:37           ` Blue Swirl
  2009-11-15 21:21           ` malc
@ 2009-11-16 19:12           ` Anthony Liguori
  2009-11-16 20:11             ` [Qemu-devel] [PATCH] vga-pci: Fix access to linear framebuffer Stefan Weil
  2 siblings, 1 reply; 12+ messages in thread
From: Anthony Liguori @ 2009-11-16 19:12 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Blue Swirl, qemu-devel, Gleb Natapov

Stefan Weil wrote:
> malc schrieb:
>   
>> On Sun, 15 Nov 2009, Gleb Natapov wrote:
>>
>>     
>>> On Sun, Nov 15, 2009 at 06:22:40PM +0300, malc wrote:
>>>       
>>>> On Sun, 15 Nov 2009, Blue Swirl wrote:
>>>>
>>>>         
>>>>> On Sun, Nov 15, 2009 at 3:25 AM, malc <av1474@comtv.ru> wrote:
>>>>>           
>>>>>> debian-503-i386-netinst.iso when booted on a machine with `-vga
>>>>>> std' just
>>>>>> shows black screen (after bios' setup screen)
>>>>>>             
>>>>> Just some observations:
>>>>> - if you press enter, installer starts and Linux is able to fix the
>>>>> display
>>>>> - the screen is fine with -bios pcbios.bin, so the issue is related
>>>>> to SeaBIOS
>>>>>           
>>>> Yes i forgot to mention that -bios works, also worth noting is that
>>>> before
>>>> the commit that fixed cirrus -bios hack also made it work.
>>>>         
>
>
> Here is a summary of my analysis of this problem:
>
> Graphics mode memory (ram 0xe0000000 ...) is not mapped
> in QEMU address space (which results in unassigned
> memory writes) for standard pci vga (-vga std), so users
> don't get vga display output with grub (in graphical mode),
> debian installer (in graphical mode) or similar boot software.
>   

0xe00... is the VBE mapping.  The VGABIOS assumes this mapping exists 
when using VBE.  Cirrus doesn't support VBE so it wouldn't be exposed there.

Does the following help:

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 479ffb1..e273b8b 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -107,6 +107,12 @@ static int pci_vga_initfn(PCIDevice *dev)
                          PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
      }
 
+#ifdef CONFIG_BOCHS_VBE
+    /* XXX: use optimized standard vga accesses */
+    cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+                                 vga_ram_size, s->vga.vram_offset);
+#endif
+
      /* ROM BIOS */
      rom_add_vga(VGABIOS_FILENAME);
      return 0;

Regards,

Anthony Liguori

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [Qemu-devel] [PATCH] vga-pci: Fix access to linear framebuffer
  2009-11-16 19:12           ` Anthony Liguori
@ 2009-11-16 20:11             ` Stefan Weil
  0 siblings, 0 replies; 12+ messages in thread
From: Stefan Weil @ 2009-11-16 20:11 UTC (permalink / raw)
  To: anthony, qemu-devel

Anthony Liguori's patch fixes the problems with
vga display in graphical mode and SeaBIOS.

I only adapted some values for vga-pci.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 hw/vga-pci.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 234d581..a6ad46b 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -107,6 +107,12 @@ static int pci_vga_initfn(PCIDevice *dev)
                          PCI_BASE_ADDRESS_MEM_PREFETCH, vga_map);
      }
 
+#ifdef CONFIG_BOCHS_VBE
+    /* XXX: use optimized standard vga accesses */
+    cpu_register_physical_memory(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+                                 VGA_RAM_SIZE, s->vram_offset);
+#endif
+
      /* ROM BIOS */
      rom_add_vga(VGABIOS_FILENAME);
      return 0;
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-11-16 20:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-15  1:25 [Qemu-devel] Standard vga breakage malc
2009-11-15 10:20 ` Blue Swirl
2009-11-15 15:22   ` malc
2009-11-15 15:28     ` Gleb Natapov
2009-11-15 15:40       ` malc
2009-11-15 20:16         ` Stefan Weil
2009-11-15 20:37           ` Blue Swirl
2009-11-15 21:21           ` malc
2009-11-15 21:35             ` Blue Swirl
2009-11-16 18:21             ` Stefan Weil
2009-11-16 19:12           ` Anthony Liguori
2009-11-16 20:11             ` [Qemu-devel] [PATCH] vga-pci: Fix access to linear framebuffer Stefan Weil

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).