Subject: Re: current panic: trap
To: None <port-macppc@NetBSD.org>
From: Chris Tribo <ctribo@college.dtcc.edu>
List: port-macppc
Date: 12/13/2004 23:59:54
 From the land of the inexplicable, I rebooted, same kernel, and it 
worked! I should have clarified better, the can't map IRQ dmesg was 
from 2.0, so then I built a current kernel from todays sources with no 
patches applied and that's what the panic and now, non-panic is from. 
Since I should know better than not posting full dmesgs by now, here's 
the whole thing. IRQ 25 seems to be correct as slot 1 is 23 and slot 2 
is 24. It looks like it probes everything fine. The starfire nic's 
won't send packets though, tcpdump shows data coming in off the wire, 
and ifconfig -i shows packet counters incrementing in both directions. 
So nothing wrong with the pci code for me, keep up the good work! Sorry 
for the noise!

NetBSD 2.99.11 (GENERIC) #0: Mon Dec 13 22:55:16 EST 2004
	root@blah:/usr/current/src/sys/arch/macppc/compile/obj/GENERIC
total memory = 384 MB
avail memory = 364 MB
mainbus0 (root)
cpu0 at mainbus0: 750 (Revision 2.2), ID 0 (primary)
cpu0: HID0 8290c0a4<EMCP,ECLK,DOZE,DPM,ICE,DCE,SGE,BTIC,BHT>
cpu0: 271.19 MHz, no-parity 512KB WB L2 cache (PB SRAM) at 2:1 ratio
grackle0 at mainbus0
pci0 at grackle0 bus 0
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Motorola MPC106 "Grackle" Host Bridge (rev. 0x40)
fwohci0 at pci0 dev 13 function 0: Texas Instruments TSB12LV26 IEEE 
1394 Host Controller (rev. 0x00)
fwohci0: interrupting at irq 23
fwohci0: OHCI 1.0, 00:d0:03:56:00:a1:a0:5b, 400Mb/s, 2048 max_rec, 4 
ir_ctx, 8 it_ctx
ohci0 at pci0 dev 14 function 0: Opti 82C861 (rev. 0x10)
ohci0: interrupting at irq 24
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: Opti OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ppb0 at pci0 dev 15 function 0: Digital Equipment DC21154 PCI-PCI 
Bridge (rev. 0x02)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
sf0 at pci1 dev 4 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
sf0: interrupting at irq 25
sf0: Ethernet address 00:00:d1:ed:41:5d
sf0: 64-bit PCI slot detected
sqphy0 at sf0 phy 1: Seeq 80220 10/100 media interface, rev. 1
sqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf1 at pci1 dev 5 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
sf1: interrupting at irq 25
sf1: Ethernet address 00:00:d1:ed:41:5e
sf1: 64-bit PCI slot detected
sqphy1 at sf1 phy 1: Seeq 80220 10/100 media interface, rev. 1
sqphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf2 at pci1 dev 6 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
sf2: interrupting at irq 25
sf2: Ethernet address 00:00:d1:ed:41:5f
sf2: 64-bit PCI slot detected
sqphy2 at sf2 phy 1: Seeq 80220 10/100 media interface, rev. 1
sqphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
sf3 at pci1 dev 7 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
sf3: interrupting at irq 25
sf3: Ethernet address 00:00:d1:ed:41:60
sf3: 64-bit PCI slot detected
sqphy3 at sf3 phy 1: Seeq 80220 10/100 media interface, rev. 1
sqphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
obio0 at pci0 dev 16 function 0: addr 0xf3000000
mesh0 at obio0 offset 0x10000 irq 12: 50MHz, SCSI ID 7
scsibus0 at mesh0: 8 targets, 8 luns per target
bm0 at obio0 offset 0x11000 irq 42,33: address 00:05:02:6e:31:29
zsc0 at obio0 offset 0x13000: irq 15,16
zstty0 at zsc0 channel 0
zstty1 at zsc0 channel 1
davbus at obio0 offset 0x14000 not configured
swim3 at obio0 offset 0x15000 not configured
nvram0 at obio0 offset 0x60000
wdc0 at obio0 offset 0x20000 irq 13: DMA transfer
atabus0 at wdc0 channel 0
wdc1 at obio0 offset 0x21000 irq 14: DMA transfer
atabus1 at wdc1 channel 0
adb0 at obio0 offset 0x16000 irq 18: 2 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: adjustable keyboard
wskbd0 at akbd0: console keyboard
adb0 addr 7: misc. device (remote control?) (2) unsupported
ofb0 at pci0 dev 18 function 0: ATI Technologies 3D Rage I/II
ofb0: 1024 x 768, 8bpp
wsdisplay0 at ofb0 kbdmux 1: console (std, vt100 emulation), using 
wskbd0
wsmux1: connecting to wsdisplay0
fw0 at fwohci0: 00:d0:03:56:00:a1:a0:5b:0a:02:ff:ff:f0:01:00:00
scsibus0: waiting 2 seconds for devices to settle...
wd0 at atabus0 drive 0: <Maxtor 51536H2>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 14594 MB, 29651 cyl, 16 head, 63 sec, 512 bytes/sect x 29888820 
sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(wdc0:0:0): using PIO mode 4, DMA mode 2 (using DMA)
atapibus0 at atabus1: 2 targets
cd0 at atapibus0 drive 0: <MATSHITA CR-589, , GA0W> cdrom removable
cd0: drive supports PIO mode 4, DMA mode 2
cd0(wdc1:0:0): using PIO mode 4, DMA mode 2 (using DMA)
boot device: wd0
root on wd0a dumps on wd0b
root file system type: ffs

On Dec 13, 2004, at 11:42 PM, Michael wrote:

> Hello,
>
>> Yeah, something is still awry with pci in current. On my Beige G3 I 
>> put
>> a StarFire card (64 bit PCI, PCI-PCI bridge with 4 ANA-62011's on it)
>> It sits in a 32 bit PCI slot since this machine doesn't have 64 bit
>> slots.
>>
>> ppb0 at pci0 dev 15 function 0: Digital Equipment DC21154 PCI-PCI
>> bridge ( rev. 0x02)
>> pci1 at ppb0 bus 1
>> pci1: i/o space, memory space enabled
>> sf0 at pci1 dev 4 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 
>> 3
>> sf0: interrupting at irq 25
>> sf0: Ethernet address 00:00:d1:xx:xx:xx
>> sf0: 64-bit PCI slot detected
>> sqphy0 at sf0 phy 1: seeq 80220 10/100 media interface, rev. 1
>> sqphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
>> sf1 at pci1 dev 5 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 
>> 3
>> sf1: interrupttrap: pid 0.1 (swapper): kernel MCHK trap @0x44f5c0
>> (SRR1=0x41030)
>> panic: trap
>> Stopped in pid 0.1 (swapper) at netbsd:cpu_Debugger+0x10: lwz r0, r1, 
>> 0
>> x14
>> db> bt
>> 0x00682220: at panic+0x19c
>> 0x006822b0: at trap+0xfc
>> 0x00682330: kernel MCHK trap by rasops_do_cursor+0x84: srr1=0x41030
>> r1=0x6823f0 cr=0x53ad9e55 xer=0xc000be6f ctr=0x2
>> saved LR(0x70) is invalid.
>> db>
>
> Ouch.
> Ok, some questions: is 25 the right IRQ for the slot?
>
>> From one of your earlier posts:
> ppb0 at pci0 dev 15 function 0: Digital Equipment DECchip 21154 PCI-PCI
> Bridge (rev. 0x02)
> pci1 at ppb0 bus 1
> pci1: i/o space, memory space enabled
> sf0 at pci1 dev 4 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
> pci_intr_map: no mapping for pin A
> sf0: unable to map interrupt
> sf1 at pci1 dev 5 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
> pci_intr_map: no mapping for pin B
> sf1: unable to map interrupt
> sf2 at pci1 dev 6 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
> pci_intr_map: no mapping for pin C
> sf2: unable to map interrupt
> sf3 at pci1 dev 7 function 0: ANA-62011 (rev 0) 10/100 Ethernet, rev. 3
> pci_intr_map: no mapping for pin D
> sf3: unable to map interrupt
>
> so OF didn't configure interrupts, you apparently updated 
> macppc/pci/pci_machdep.c, got a fix I'm sort of responsible for so 
> fixpci() should have written the same IRQ number into each sf 
> instance. Could you please compile a kernel from the same source as 
> the one that paniced above, but without the sf driver and then post 
> what scanpci -v thinks about them? ( in your earlier post they all had 
> a 0 in the IRQ register, now all should have 25 )
> Does it work with only a single sf instance?
>
> have fun
> Michael