[openfirmware] Troubleshooting VGA under qemu?
quozl at laptop.org
Thu Oct 1 07:23:51 CET 2015
On Wed, Sep 30, 2015 at 01:31:31PM +0000, Marcin Cieslak wrote:
> On Wed, 30 Sep 2015, James Cameron wrote:
> > On Wed, Sep 30, 2015 at 10:04:36AM +0000, Marcin Cieslak wrote:
> > > 1) Would that be possible to have a dual-console mode (similar to
> > > what FreeBSD early bootloader has) so that both vga and serial
> > > console are active? ofw prints messages on the serial console even
> > > if disabled, only input is not working.
> > > Newer QEMU offers Bochs VGA adapter
> > Thanks. Want me to commit?
> Would be good!
Applied, r3784. r1059 was addition of VMware SVGA driver.
> > Do you happen to know which version of QEMU switched to Bochs?
> No idea. One can switch VGA adapters with -vga switch:
> -vga std -> Bochs adapter (1234:1111), seems to be the default
For me, on Ubuntu Trusty with qemu-2.0.0+dfsg, cirrus is the default.
> -vga cirrus -> Cirrus (1013:00b8), also works
> -vga vmware -> VMWare (15ad:404) - DOES NOT WORK
For me, "-vga vmware" reproduces your problem.
> It seems that FCode gets detected, but the driver
> does not want to attach:
> Assigning PCI Space of length 10000
> Memory Space...
> Base Reg: 2001030 = 11010000
> Function:15ad Function: 405
> Non FCode Format ROM Image.
> Checking for built-in FCode match for
> Vendor:15ad Device: 405
> Checking for built-in FCode match... DROPIN NAME MATCH
> PCI PROBE-SELF: Phys.hi = 1800
Where is that output from?
I've stepped through a second invocation of the driver, and the abort
in detect-version is hit.
: detect-version ( -- )
h# 9000.0002 dup 0 reg! 0 reg@ = if exit then
h# 9000.0001 dup 0 reg! 0 reg@ = if exit then
abort \ We don't support version 0
I've checked my qemu sources, and the id register should return what
is written to it if the value is h# 9000.0002 but from the log below
it does not.
My guess is something wrong with register mapping ... or the driver
shouldn't be tried twice. Next step might be to increase the delay
for the stand-init interrupt key 'i' ... which I've been unable to
trigger. I'm also not sure how to apply the debugger to an FCode
driver that isn't loaded yet, but that would be a learning exercise.
Another way to diagnose might be to add printf's to the qemu driver.
You might also try bisecting. The VMware SVGA driver is closely
connected to fb8, and there have been several changes to fb8 since the
driver was added; maybe one of those broke something.
Hope that all helps.
Type 'i' to interrupt stand-init sequence
PCI host bridge
Calibrating millisecond timer
Unimplemented package interface procedure
Can't open output device.
Generic PC, Serial #0, 128 MiB memory installed
Copyright 1999 FirmWorks All Rights Reserved
Open Firmware demonstration version by FirmWorks (info at firmworks.com)
Type any key to interrupt automatic startup
ok com1 io
ok true to scrolling-debug?
ok dev /display
ok debug init
Stepper keys: <space> Down Up Continue Forth Go Help ? See $tring Quit
ok select /display
: init ( Empty )
: map-regs ( Empty )
Inside map-regs ( 0 )
Inside map-regs ( 0 0 )
Inside map-regs ( 0 0 1000 )
Inside map-regs ( 0 0 1000 1000010 )
Inside map-regs ( 0 0 1001010 )
Inside map-regs ( 0 0 1001010 10 )
Inside map-regs ( 0 0 1001010 10 ff89566d 6 )
Inside map-regs ( fffffff0 )
to regs u
[ Up to init ]
Inside init ( Empty )
: detect-version ( Empty )
Inside detect-version ( 90000002 )
Inside detect-version ( 90000002 90000002 )
Inside detect-version ( 90000002 90000002 0 )
Inside detect-version ( 90000002 )
Inside detect-version ( 90000002 0 )
Inside detect-version ( 90000002 ffffffff )
More information about the openfirmware