[openfirmware] Troubleshooting VGA under qemu?

James Cameron 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
   unmap-regs
   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.

--

Forthmacs 
Type 'i' to interrupt stand-init sequence
First stand-init:
Exceptions
CIF
DHCP init
memory node
Probing memory
MMU
Reclaim dictionary
PCI host bridge
ISA
Calibrating millisecond timer
RTC
CPU nodes
Keyboard overrides
Sound
Probe IDE
Unimplemented package interface procedure
nvramrc
Probing
probe-pci
USB2 devices:
USB1 devices:
Install console
Can't open output device.
Generic PC, Serial #0, 128 MiB memory installed
Open Firmware  
Copyright 1999 FirmWorks  All Rights Reserved

Open Firmware demonstration version by FirmWorks (info at firmworks.com)
Type any key to interrupt automatic startup
2 
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 dend
ok select /display
: init                    ( Empty )
map-regs                d
: map-regs                ( Empty )
0                        
Inside map-regs           ( 0 )
0                        
Inside map-regs           ( 0 0 )
my-space                 
Inside map-regs           ( 0 0 1000 )
h# 1000010               
Inside map-regs           ( 0 0 1000 1000010 )
+                        
Inside map-regs           ( 0 0 1001010 )
h# 10                    
Inside map-regs           ( 0 0 1001010 10 )
" map-in"                
Inside map-regs           ( 0 0 1001010 10 ff89566d 6 )
$call-parent             
Inside map-regs           ( fffffff0 )
to regs                 u
[ Up to init ]
Inside init               ( Empty )
detect-version          d
: detect-version          ( Empty )
h# 90000002              
Inside detect-version     ( 90000002 )
dup                      
Inside detect-version     ( 90000002 90000002 )
0                        
Inside detect-version     ( 90000002 90000002 0 )
reg!                     
Inside detect-version     ( 90000002 )
0                        
Inside detect-version     ( 90000002 0 )
reg@                     
Inside detect-version     ( 90000002 ffffffff )
=                        

-- 
James Cameron
http://quozl.linux.org.au/



More information about the openfirmware mailing list