Subject: Re: VGA device _sometimes_ not configured
To: None <netbsd-help@netbsd.org>
From: Jukka Salmi <j+nbsd@2004.salmi.ch>
List: netbsd-help
Date: 11/09/2004 12:40:27
cube@cubidou.net --> netbsd-help (2004-11-09 09:40:27 +0100):
> On Tue, Nov 09, 2004 at 09:27:38AM +0100, Jukka Salmi wrote:
> > on a i386 system running 2.0_RC4 the VGA card _sometimes_ does not attach:
> > 
> > 	ATI Technologies Radeon 7000/VE (VGA display) at pci1
> > 	  dev 0 function 0 not configured
> > 
> > Of course wsdisplay fails now because of the lack of vga[0-9]...
> > 
> > But sometimes the card attaches just fine:
> > 
> > 	vga0 at pci1 dev 0 function 0: ATI Technologies Radeon 7000/VE
> > 	  (rev. 0x00)
> > 
> > ...and after the next restart the card may or may not attach; I couldn't
> > find a pattern so far.
> > 
> > What could be the source of this problem? Faulty vga card? Something
> > else?
> 
> Obviously the card doesn't function as expected, but the BIOS might be
> responsible too.
> 
> I'd try two things:  first, GENERIC, to see if when the card doesn't
> attach at pci, it still does at isa (so GENERIC, or a kernel with
> vga0 at isa?).

I had to reboot the box a few times until vga did not attach to pci, and
while doing this I got a panic:

NetBSD 2.0_RC4 (GENERIC) #0: Fri Oct  8 15:54:45 CEST 2004
        build@grouper.salmi.ch:/build/nbsd/sys/arch/i386/compile/GENERIC
[...]
ATI Technologies Radeon 7000/VE (VGA display) at pci1 dev 0 function 0 not configured
[...]
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0 mux 1
pcdisplay0 at isa0 port 0x3d0-0x3df iomem 0xffffffff-0x7ffe
panic: pcdisplay_attach: display disappeared
Stopped in pid 0.1 (swapper) at netbsd:cpu_Debugger+0x4:        leave
db> tr
cpu_Debugger(e,c0896c30,c08b3000,c0896c30,c1262380) at netbsd:cpu_Debugger+0x4
panic(c073b1a0,1,0,0,4) at netbsd:panic+0x11d
pcdisplay_attach(c1276e80,c1262380,c0896c30,c12623bc,220) at netbsd:pcdisplay_attach+0xdc
config_attach(c1276e80,c074ff84,c0896c30,c04d0404,c079a660) at netbsd:config_attach+0x23c
isasearch(c1276e80,c074ff84,0,c058ecd0,c074ff84) at netbsd:isasearch+0xc1
mapply(c0896cc0,c074ff84,0,0,c04d0654) at netbsd:mapply+0x36
config_search(c04d0654,c1276e80,0,c1276ed0,1) at netbsd:config_search+0x8c
config_attach(c1262e00,c074fd38,c0896d80,c04cff38,c06bd83e) at netbsd:config_attach+0x23c
pcib_callback(c1262e00,c075ada0,0,8,20) at netbsd:pcib_callback+0x43
config_process_deferred(c07cb75c,c1113c00,0,c1113c60,1) at netbsd:config_process_deferred+0x4c
config_attach(c123bf80,c074f558,c0896e70,c0433614,c06d20bd) at netbsd:config_attach+0x24b
mainbus_attach(0,c123bf80,0,c123bfb4,c074f53c) at netbsd:mainbus_attach+0x195
config_attach(0,c074f53c,0,0,c07d7b20) at netbsd:config_attach+0x23c
config_rootfound(c06bd230,0,c0896f68,c040252d,c06ce662) at netbsd:config_rootfound+0x27
cpu_configure(0,c07d7b20,c0896fa0,c03510a4,0) at netbsd:cpu_configure+0x24
configure(0,0,0,0,0) at netbsd:configure+0x4a
main(0,0,0,0,0) at netbsd:main+0x2e4
db> 

I couldn't reproduce this so far.

Some reboots later vga attached to isa; here's the diff between dmesg
outputs:

$ diff generic.success generic.failure
< vga1 at pci1 dev 0 function 0: ATI Technologies Radeon 7000/VE (rev. 0x00)
< wsdisplay0 at vga1 kbdmux 1
< wsmux1: connecting to wsdisplay0
---
> ATI Technologies Radeon 7000/VE (VGA display) at pci1 dev 0 function 0 not configured
75a74,76
> vga0 at isa0 port 0x3b0-0x3df iomem 0xa0000-0xbffff
> wsdisplay0 at vga0 kbdmux 1
> wsmux1: connecting to wsdisplay0


> The other thing I'd check is the content of the PCI
> configuration space for that device after a failed boot.  Precisely,
> the content of the command status register for the flags IO_ENABLE and
> MEM_ENABLE.

Hmm, how can I do this?


Thanks for your help so far.

Regards, Jukka

> That way we could know if attachments is failing in vga_pci_match or
> in vga_common_probe.
> 
> Quentin Garnier.

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~