Subject: trouble getting bus_dma(9) to work on a new port
To: None <tech-kern@NetBSD.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: tech-kern
Date: 08/21/2003 19:02:01
Hi.

I am working on a port of NetBSD to the Motorola PowerStack II. This is
a PReP machine with OpenFirmWare. I did the port as a new platform for
the already existing port-ofppc. PCI / ISA bus attachments and
bus_space(9) are working. At the moment I am at the point where the
kernel asks for the root device. Problem is that bus_dma(9) isn't
working and I can't find where the problem is. I am using the generic
PPC bus_dma(9) code from sys/arch/powerpc/powerpc/bus_dma.c that is used
by port PReP too. Everything looks good, I get interrups from tlp0, but
it seams that no data gets transfered. When I enter tlp0 as boot device
no packets are generated and tlp0 gets timeouts. See bootlog below.

Some ideas how to debug this? 


ok boot net
Boot device: /pci/ethernet@4  File and args: 

>> NetBSD/ofppc OpenFirmware Boot, Revision 1.5
>> (jkunz@SirTobie, Fri Aug  8 23:24:09 CEST 2003)
net_open: client addr: 192.168.2.9
net_open: subnet mask: 255.255.255.0
net_open: server addr: 192.168.2.2
net_open: server path: /usr/nfsroot/NetBSD/ofppc
net_open: file name: /ofwboot
Using IP address: 192.168.2.9
root addr=192.168.2.2 path=/usr/nfsroot/NetBSD/ofppc
 start=0x100000
[ using 260168 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.6 (PSIINOSCSI) #238: Thu Aug 21 17:20:54 CEST 2003
    jkunz@SirTobie:/usr/src/sys/arch/ofppc/compile/PSIINOSCSI
total memory = 128 MB
avail memory = 112 MB
using 1664 buffers containing 6656 KB of memory
mainbus0 (root): MOT,PowerStack_II_Pro4000
cpu0 at mainbus0: 604ev (Revision 2.3), ID 0 (primary)
cpu0: HID0 8090c084<EMCP,DOZE,DPM,ICE,DCE,SGE,BHT>
cpu_timebase=0x0 =0 tbase=0xfe3620 =16660000
powerstackII0 at mainbus0io: freeing from 0x0 to 0x7fffff
io: freeing from 0x1000000 to 0x3f7fffff
extent `powerstackII_bus_io' (0x0 - 0xffffffff), flags = 0x1
     0x800000 - 0xffffff
     0x3f800000 - 0xfffffffe
mem: freeing from 0x0 to 0x3fdfffff
extent `powerstackII_bus_mem' (0x0 - 0xffffffff), flags = 0x1
     0x3fe00000 - 0xfffffffe
powerstackII_isa_init
: IBM 27-82660 PCI Bridge, rev. 0x02
pci0 at powerstackII0 bus 0
enabling IDE controller unknown to OFW
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
pcib0 at pci0 dev 1 function 0
pcib0:
pcib0: vendor 0x10ad product 0x0565 (rev. 0x10)
pciide0 at pci0 dev 1 function 1: Symphony Labs 82C105 IDE controller
(rev. 0x05)
pciide0: bus-master DMA support presentio: allocating 0x0 to 0xf

pciide0: primary channel configured to native-PCI mode
pciide0: using powerstackII irq 14 for native-PCI interrupt
io: allocating 0x1f0 to 0x1f7
io: allocating 0x3f4 to 0x3f7
wd0 at pciide0 channel 0 drive 0: <Conner Peripherals 120MB - CP30104H>
wd0: drive supports 64-sector PIO transfers, chs addressing
wd0: 116 MB, 762 cyl, 8 head, 39 sec, 512 bytes/sect x 237744 sectors
wd0(pciide0:0:0): using PIO mode 0
pciide0: secondary channel configured to native-PCI mode
io: allocating 0x170 to 0x177
io: allocating 0x374 to 0x377
vendor 0x1000 product 0x0003 (SCSI mass storage, revision 0x13) at pci0
dev 2 function 0 not configured
tlp0 at pci0 dev 4 function 0: DECchip 21140A Ethernet, pass 2.2
io: allocating 0x1400 to 0x147f
mem: allocating 0x1002000 to 0x100207f
tlp0: interrupting at powerstackII irq 11
tlp0: Ethernet address 08:00:3e:28:fe:44
nsphy0 at tlp0 phy 8: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
tlp0: 10base5
isa0 at pcib0powerstackII_isa_attach_hook

io: allocating 0x100 to 0x100
io: freeing handle 0x80000100 for 0x1
io: freeing 0x100 to 0x100
io: allocating 0x3f8 to 0x3ff
io: freeing handle 0x800003f8 for 0x8
io: freeing 0x3f8 to 0x3ff
com0 at isa0 port 0x3f8-0x3ff irq 4io: allocating 0x3f8 to 0x3ff
: ns16550a, working fifo
io: allocating 0x2f8 to 0x2ff
io: freeing handle 0x800002f8 for 0x8
io: freeing 0x2f8 to 0x2ff
com1 at isa0 port 0x2f8-0x2ff irq 3io: allocating 0x2f8 to 0x2ff
: ns16550a, working fifo
io: allocating 0x60 to 0x60
io: allocating 0x64 to 0x64
io: freeing handle 0x80000060 for 0x1
io: freeing 0x60 to 0x60
io: freeing handle 0x80000064 for 0x1
io: freeing 0x64 to 0x64
pckbc0 at isa0 port 0x60-0x64io: allocating 0x60 to 0x60
io: allocating 0x64 to 0x64

io: allocating 0x300 to 0x31f
io: freeing handle 0x80000300 for 0x20
io: freeing 0x300 to 0x31f
io: allocating 0x3bc to 0x3bf
io: freeing handle 0x800003bc for 0x4
io: freeing 0x3bc to 0x3bf
lpt0 at isa0 port 0x3bc-0x3bf irq 7
io: allocating 0x3bc to 0x3bf
io: allocating 0x40 to 0x43
io: allocating 0x61 to 0x61
io: freeing handle 0x80000040 for 0x4
io: freeing 0x40 to 0x43
io: freeing handle 0x80000061 for 0x1
io: freeing 0x61 to 0x61
pcppi0 at isa0 port 0x61io: allocating 0x40 to 0x43
io: allocating 0x61 to 0x61

isabeep0 at pcppi0
io: allocating 0x74 to 0x77
io: freeing handle 0x80000074 for 0x4
io: freeing 0x74 to 0x77
mkclock0 at isa0 port 0x74-0x77io: allocating 0x74 to 0x77
: mk48t18
led at mainbus0 not configured
Planar-ID at mainbus0 not configured
ofbus0 at mainbus0
aix at ofbus0 not configured
flash at mainbus0 not configured
flash at mainbus0 not configured
boot device: <unknown>
root device: tlp0
dump device: 
file system (default generic): 
root on tlp0
nfs_boot: trying DHCP/BOOTP
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
tlp0: tlp_filter_setup: sc_flags 0x00001806
tlp0: tlp_filter_setup: deferring
tlp0: tlp_start: sc_flags 0x00001807, if_flags 0xffff8847
tlp0: tlp_start: sc_flags 0x00001807, if_flags 0xffff8c47
tlp0: tlp_filter_setup: sc_flags 0x00001807
tlp0: tlp_filter_setup: deferring
tlp0: tlp_start: sc_flags 0x00001807, if_flags 0xffff8c47
tlp0: tlp_filter_setup: sc_flags 0x00001807
tlp0: tlp_filter_setup: deferring
tlp0: tlp_start: sc_flags 0x00001807, if_flags 0xffff8c47
tlp0: filter setup and transmit timeout
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
     txsoft 0xe005930c transmit chain:
     descriptor 1:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f0d3d6
       td_bufaddr2: 0x80014020
     descriptor 2:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014030
     txsoft 0xe0059324 transmit chain:
     descriptor 3:
       td_status:   0x80000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f0d7d6
       td_bufaddr2: 0x80014040
     descriptor 4:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014050
tlp0: packets enqueued, IC on 4, OWN on 1
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1019, txnext 5
     txsoft 0xe005933c transmit chain:
     descriptor 5:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f0dbd6
       td_bufaddr2: 0x80014060
     descriptor 6:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014070
tlp0: packets enqueued, IC on 6, OWN on 5
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1017, txnext 7
     txsoft 0xe0059354 transmit chain:
     descriptor 7:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f0dfd6
       td_bufaddr2: 0x80014080
     descriptor 8:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014090
tlp0: packets enqueued, IC on 8, OWN on 7
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1015, txnext 9
     txsoft 0xe005936c transmit chain:
     descriptor 9:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f163d6
       td_bufaddr2: 0x800140a0
     descriptor 10:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x800140b0
tlp0: packets enqueued, IC on 10, OWN on 9
tlp0: filter setup and transmit timeout
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
nfs_boot: timeout...
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
     txsoft 0xe005930c transmit chain:
     descriptor 1:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f163d6
       td_bufaddr2: 0x80014020
     descriptor 2:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014030
tlp0: packets enqueued, IC on 2, OWN on 1
tlp0: filter setup and transmit timeout
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
nfs_boot: timeout...
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
     txsoft 0xe005930c transmit chain:
     descriptor 1:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f163d6
       td_bufaddr2: 0x80014020
     descriptor 2:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014030
tlp0: packets enqueued, IC on 2, OWN on 1
tlp0: filter setup and transmit timeout
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
nfs_boot: timeout...
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
     txsoft 0xe005930c transmit chain:
     descriptor 1:
       td_status:   0x00000000
       td_ctl:      0x2000002a
       td_bufaddr1: 0x80f163d6
       td_bufaddr2: 0x80014020
     descriptor 2:
       td_status:   0x80000000
       td_ctl:      0x40000224
       td_bufaddr1: 0x80f15000
       td_bufaddr2: 0x80014030
tlp0: packets enqueued, IC on 2, OWN on 1
tlp0: filter setup and transmit timeout
tlp0: tlp_filter_setup: sc_flags 0x00001804
ttlp0: tlp_intr
lp0: tlp_filter_setup: returning
tlp0: tlp_start: sc_flags 0x00001806, if_flags 0xffff8847
tlp0: tlp_start: txfree 1023, txnext 1
tlp0: tlp_filter_setup: sc_flags 0x00001806
tlp0: tlp_filter_setup: deferring
tlp0: tlp_start: sc_flags 0x00001807, if_flags 0xffff8847
tlp0: tlp_start: sc_flags 0x00001804, if_flags 0xffff8806
no file system for tlp0
cannot mount root, error = 79
root device (default tlp0): 
dump device: 
-- 


tschüß,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/