Subject: Re: E250 support?
To: None <eeh@netbsd.org>
From: Mark Blackman <mark.blackman@netscalibur.co.uk>
List: port-sparc64
Date: 02/04/2001 17:19:27
Ok, I booted with 'netbsd -d', set both 'sparc_pci_debug' and 'psycho_debug'
to 0xff with results below. Hope they mean something to you. :)

{0} ok boot net netbsd -d
Resetting ...

Sun (TM) Enterprise 250 (2 X UltraSPARC-II 400MHz), Keyboard Present
OpenBoot 3.16, 1024 MB memory installed, Serial #15128240.
Ethernet address 8:0:20:e6:d6:b0, Host ID: 80e6d6b0.



Rebooting with command: boot net netbsd -d
Boot device: /pci@1f,4000/network@1,1  File and args: netbsd -d
43800 >> NetBSD/sparc64 OpenFirmware Boot, Revision
>> (eeh@nonplus.netbsd.org, Sat Jan 13 09:12:31 PST 2001)
Using BOOTPARAMS protocol: ip address: 192.168.1.235, hostname: sunbox.ch.foobar.net
root addr=192.168.1.150 path=/tmp/export/sunbox/root
main: Calling loadfile(fd, /pci@1f,4000/network@1,1/netbsd -d)
loadfile: reading header
elf64_exec: Booting /pci@1f,4000/network@1,1/netbsd
3233760@0x1000000+218560@0x1400000+538336@0x14355c0
symbols @ 0xfefa4340 84+247680+127537 start=0x1000000
chain: calling OF_chain(800000, ee48, 1000000, fff89a80, 18)
OF_chain: prom returned!
Calling entry(0, 0xfff89a80, 18, f007601c, f007601c)
[ using 376144 bytes of netbsd ELF symbol table ]
prom_get_msgbuf: Cannot recover msgbuf on E250
prom_get_msgbuf: allocated new buf at 00000000
prom_get_msgbuf: claiming new buf at 00000000
pmap_bootstrap: could not claim physical dseg extention at 3fcba000 size 346000
Setting DTLB entry 00000000 01000000 data e0000000 3f800076
Setting DTLB entry 00000000 01400000 data e0000000 3f400076
Setting ITLB entry 00000000 01000000 data e0000000 3f400076
Setting TSB pointer 00000000 014ca000
consinit()
setting up stdin
stdin instance = fff69760
setting up stdout
stdout instance = fff69d00
stdout package = f006eca8
console is unknown
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
    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.5Q (GENERIC) #12: Sun Jan 14 10:54:27 PST 2001
    eeh@nonplus.netbsd.org:/home4/src/sys/arch/sparc64/compile/GENERIC
total memory = 1024 MB
avail memory = 942 MB
using 6566 buffers containing 52528 KB of memory
bootpath: /pci@1f,4000/network@1,1
kdb breakpoint at 1262dd0
1 tt=1ff tstate=0 tpc=0x0 tnpc=0x0
Stopped in pid 0 (swapper) at   cpu_Debugger+0x4:       nop
db> x/x sparc_pci_debug
sparc_pci_debug:        0
db> w/l sparc_pci_debug 0x000000ff
sparc_pci_debug                  0 =       0xff
db> x/x sparc_pci_debug
sparc_pci_debug:        ff
db> x/x psycho_debug
psycho_debug:   0
db> w/l psycho_debug 0x000000ff
psycho_debug                     0 =       0xff
db> x/x psycho_debug
psycho_debug:   ff
db> continue
mainbus0 (root): SUNW,Ultra-250
cpu0 at mainbus0: SUNW,UltraSPARC-II @ 400 MHz, version 0 FPU
cpu0: physical 4K instruction (32 b/l), 4K data (32 b/l), 2048K external (64 b/l)
psycho0 at mainbus0 addr 0xfffbc000
psycho: impl 0, version 4: psycho debug: got `ranges' for node f006bf9c: 4 entries
psycho debug: got `bus-range' for node f006bf9c: 0 - 0
bus range 0 to 0; PCI bus 0psycho debug: got `interupt-map' for node f006bf9c
psycho debug: got `interrupt-map-mask' for node f006bf9c

DVMA map: fe002000 to ffffe000
pci0 at psycho0
pci_attach_hook:
        node f006e48c name `ebus' devtype `':
        node f0084cf4 name `network' devtype `network': got interrupts got assigned-addresses got reg; bus 0 dev 1 fn 1; tag 00000900
        ; reg: hi 900 mid 0 lo 0 intr 21
        ; intmapmask: hi fff800 mid 0 lo 0 intr 7
        ; after: hi 800 mid 0 lo 0 intr 1
                matching for: hi 800 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 1
                matching for: hi 1000 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 3
                matching for: hi 1000 mid 0 lo 0 intr 4
                matching for: hi 1800 mid 0 lo 0 intr 1
                matching for: hi 1900 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 2
                matching for: hi 2000 mid 0 lo 0 intr 3
                matching for: hi 2000 mid 0 lo 0 intr 4
                matching for: hi 2800 mid 0 lo 0 intr 1
                matching for: hi 2800 mid 0 lo 0 intr 2
                matching for: hi 2800 mid 0 lo 0 intr 3
                matching for: hi 2800 mid 0 lo 0 intr 4
        ; PSYCHO: no match but obio interrupt in parent formatpci_conf_read: tag 900; reg 3c; asi = 1d; readaddr = 1fe0100093c (offset = 93
c) ... returning 050a0000

            ; read 50a0000 from intreg
            ; gonna write 50a00ef to intregpci_conf_write: tag 900; reg 3c; data 50a00ef; asi = 1d; readaddr = 1fe0100093c (offset = 93c)

            ; reread 50a00ef from intregpci_conf_write: tag 900; reg 4; data 6; asi = 1d; readaddr = 1fe01000904 (offset = 904)

        node f008cd00 name `scsi' devtype `scsi-2': got interrupts got assigned-addresses got reg; bus 0 dev 3 fn 0; tag 00001800
        ; reg: hi 1800 mid 0 lo 0 intr 20
        ; intmapmask: hi fff800 mid 0 lo 0 intr 7
        ; after: hi 1800 mid 0 lo 0 intr 0
                matching for: hi 800 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 1
                matching for: hi 1000 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 3
                matching for: hi 1000 mid 0 lo 0 intr 4
                matching for: hi 1800 mid 0 lo 0 intr 1
                matching for: hi 1900 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 2
                matching for: hi 2000 mid 0 lo 0 intr 3
                matching for: hi 2000 mid 0 lo 0 intr 4
                matching for: hi 2800 mid 0 lo 0 intr 1
                matching for: hi 2800 mid 0 lo 0 intr 2
                matching for: hi 2800 mid 0 lo 0 intr 3
                matching for: hi 2800 mid 0 lo 0 intr 4
        ; PSYCHO: no match but obio interrupt in parent formatpci_conf_read: tag 1800; reg 3c; asi = 1d; readaddr = 1fe0100183c (offset = 1
83c) ... returning 40110100

            ; read 40110100 from intreg
            ; gonna write 401101ef to intregpci_conf_write: tag 1800; reg 3c; data 401101ef; asi = 1d; readaddr = 1fe0100183c (offset = 183
c)

            ; reread 401101ef from intregpci_conf_write: tag 1800; reg 4; data 6; asi = 1d; readaddr = 1fe01001804 (offset = 1804)

        node f0093f1c name `scsi' devtype `scsi-2': got interrupts got assigned-addresses got reg; bus 0 dev 3 fn 1; tag 00001900
        ; reg: hi 1900 mid 0 lo 0 intr 26
        ; intmapmask: hi fff800 mid 0 lo 0 intr 7
        ; after: hi 1800 mid 0 lo 0 intr 6
                matching for: hi 800 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 1
                matching for: hi 1000 mid 0 lo 0 intr 2
                matching for: hi 1000 mid 0 lo 0 intr 3
                matching for: hi 1000 mid 0 lo 0 intr 4
                matching for: hi 1800 mid 0 lo 0 intr 1
                matching for: hi 1900 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 1
                matching for: hi 2000 mid 0 lo 0 intr 2
                matching for: hi 2000 mid 0 lo 0 intr 3
                matching for: hi 2000 mid 0 lo 0 intr 4
                matching for: hi 2800 mid 0 lo 0 intr 1
                matching for: hi 2800 mid 0 lo 0 intr 2
                matching for: hi 2800 mid 0 lo 0 intr 3
                matching for: hi 2800 mid 0 lo 0 intr 4
        ; PSYCHO: no match but obio interrupt in parent formatpci_conf_read: tag 1900; reg 3c; asi = 1d; readaddr = 1fe0100193c (offset = 1
93c) ... returning 40110200

            ; read 40110200 from intreg
            ; gonna write 401102ef to intregpci_conf_write: tag 1900; reg 3c; data 401102ef; asi = 1d; readaddr = 1fe0100193c (offset = 193
c)

            ; reread 401102ef from intregpci_conf_write: tag 1900; reg 4; data 6; asi = 1d; readaddr = 1fe01001904 (offset = 1904)


pci0: i/o space, memory space enabled
pci_conf_read: tag 0; reg 0; asi = 1d; readaddr = 1fe01000000 (offset = 0) ... returning 8000108e
pci_conf_read: tag 0; reg c; asi = 1d; readaddr = 1fe0100000c (offset = c) ... returning 00004000
pci_conf_read: tag 0; reg 0; asi = 1d; readaddr = 1fe01000000 (offset = 0) ... returning 8000108e
pci_conf_read: tag 0; reg 4; asi = 1d; readaddr = 1fe01000004 (offset = 4) ... returning 02800046
pci_conf_read: tag 0; reg 8; asi = 1d; readaddr = 1fe01000008 (offset = 8) ... returning 06000000
pci_conf_read: tag 0; reg 3c; asi = 1d; readaddr = 1fe0100003c (offset = 3c) ... returning 00000000
Sun Microsystems psycho PCI controller (host bridge) at pci0 dev 0 function 0 not configured
pci_conf_read: tag 800; reg 0; asi = 1d; readaddr = 1fe01000800 (offset = 800) ... returning 1000108e
pci_conf_read: tag 800; reg c; asi = 1d; readaddr = 1fe0100080c (offset = 80c) ... returning 00800a00
pci_conf_read: tag 800; reg 0; asi = 1d; readaddr = 1fe01000800 (offset = 800) ... returning 1000108e
pci_conf_read: tag 800; reg 4; asi = 1d; readaddr = 1fe01000804 (offset = 804) ... returning 02800146
pci_conf_read: tag 800; reg 8; asi = 1d; readaddr = 1fe01000808 (offset = 808) ... returning 06800001
pci_conf_read: tag 800; reg 3c; asi = 1d; readaddr = 1fe0100083c (offset = 83c) ... returning 190a0000
ebus0 at pci0 dev 1 function 0
ebus0: Sun Microsystems PCIO Ebus2, revision 0x01
auxio0 at ebus0 addr 726000-726003 addr 728000-728003 addr 72a000-72a003 addr 72c000-72c003 addr 72f000-72f003
power at ebus0 addr 724000-724003 not configured
SUNW,pll at ebus0 addr 504000-504002 not configured
sc at ebus0 addr 500000-500007 not configured
se at ebus0 addr 400000-40007f ipl 43 not configured
se at ebus0 addr 200000-20007f ipl 35 not configured
com0 at ebus0 addr 3083f8-3083ff ipl 41_psycho_bus_map: type 4 off 713083f8 sz 8 flags 2 va 0x0 cspace 2
_psycho_bus_map: mapping paddr space 2 offset 713083f8 paddr 1fff13083f8

psycho_intr_establish: ihandle 29 ino 29
psycho: intr 29: 0x0
Hunting for IRQ...
- turning on OBIO intr 9; read intrmap = 00000000000007e9; addr of intrmapptr = 0xfffad048; writing intrmap = 00000000800007e9
; reread intrmap = 00000000800007e9; installing handler 0x102bf18 arg 0x272da00 with ino 41 pil 12
: ns16550a, working fifo
kbd0 at com0
com1 at ebus0 addr 3062f8-3062ff ipl 42_psycho_bus_map: type 4 off 713062f8 sz 8 flags 2 va 0x0 cspace 2
_psycho_bus_map: mapping paddr space 2 offset 713062f8 paddr 1fff13062f8

psycho_intr_establish: ihandle 2a ino 2a
psycho: intr 2a: 0x0
Hunting for IRQ...
- turning on OBIO intr 10; read intrmap = 00000000000007ea; addr of intrmapptr = 0xfffad050; writing intrmap = 00000000800007ea
; reread intrmap = 00000000800007ea; installing handler 0x102bf18 arg 0x272d800 with ino 42 pil 12
: ns16550a, working fifo
ms0 at com1
lpt0 at ebus0 addr 3043bc-3043cb addr 300398-300399 addr 700000-70000f ipl 34_psycho_bus_map: type 4 off 713043bc sz 10 flags 2 va 0x0 cspa
ce 2
_psycho_bus_map: mapping paddr space 2 offset 713043bc paddr 1fff13043bc

psycho_intr_establish: ihandle 22 ino 22
psycho: intr 22: 0x0
Hunting for IRQ...
- turning on OBIO intr 2; read intrmap = 00000000000007e2; addr of intrmapptr = 0xfffad010; writing intrmap = 00000000800007e2
; reread intrmap = 00000000800007e2; installing handler 0x1233460 arg 0x26e9900 with ino 34 pil 12

clock0 at ebus0 addr 0-1fff_psycho_bus_map: type 4 off 71000000 sz 2000 flags 2 va 0x0 cspace 2
_psycho_bus_map: mapping paddr space 2 offset 71000000 paddr 1fff1000000
: mk48t59: hostid 80e6d6b0
flashprom at ebus0 addr 0-fffff addr 0-fffff not configured
SUNW,envctrltwo at ebus0 addr 600000-600003 ipl 40 ipl 37 not configured
pci_conf_read: tag 900; reg 0; asi = 1d; readaddr = 1fe01000900 (offset = 900) ... returning 1001108e
pci_conf_read: tag 900; reg 4; asi = 1d; readaddr = 1fe01000904 (offset = 904) ... returning 02800006
pci_conf_read: tag 900; reg 8; asi = 1d; readaddr = 1fe01000908 (offset = 908) ... returning 02000001
pci_conf_read: tag 900; reg 3c; asi = 1d; readaddr = 1fe0100093c (offset = 93c) ... returning 050a00ef
hme1 at pci0 dev 1 function 1pci_conf_read: tag 900; reg 4; asi = 1d; readaddr = 1fe01000904 (offset = 904) ... returning 02800006
pci_conf_write: tag 900; reg 4; data 2800006; asi = 1d; readaddr = 1fe01000904 (offset = 904)
pci_conf_read: tag 900; reg 10; asi = 1d; readaddr = 1fe01000910 (offset = 910) ... returning 00008000
pci_conf_write: tag 900; reg 10; data ffffffff; asi = 1d; readaddr = 1fe01000910 (offset = 910)
pci_conf_read: tag 900; reg 10; asi = 1d; readaddr = 1fe01000910 (offset = 910) ... returning ffff8000
pci_conf_write: tag 900; reg 10; data 8000; asi = 1d; readaddr = 1fe01000910 (offset = 910)
_psycho_bus_map: type 4 off 8000 sz 8000 flags 0 va 0x0 cspace 2
_psycho_bus_map: mapping paddr space 2 offset 8000 paddr 1ff80008000
: address 08:00:20:e6:d6:b0
nsphy0 at hme1 phy 1: DP83840 10/100 media interface, rev. 1
nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pci_intr_map: tag 900; pin 0; line 239panic: psycho_intr_map: line line < 0 || line > 0x32
kdb breakpoint at 1262dd0
1 tt=1ff tstate=0 tpc=0x0 tnpc=0x0
Stopped in pid 0 (swapper) at   cpu_Debugger+0x4:       nop
db> trace
psycho_intr_map(900, 0, ef, 180922c, 0, 0) at psycho_intr_map+0x18
pci_intr_map(0, 180922c, 0, 2733b68, e0030000, 2733bc8) at pci_intr_map+0x84
hmeattach_pci(2707a80, 2733800, 1809490, 1224ee0, 2729d10, 2729d18) at hmeattach
_pci+0x130
config_attach(2733800, 140b248, 1809490, 0, 140fc00, 140a000) at config_attach+0
x3b4
config_found_sm(2707a80, 1809490, 1217db0, 1217f88, 50a00ef, 0) at config_found_
sm+0x24
pci_probe_bus(2707a80, 8, ffff, 2, 2707d00, 2707c80) at pci_probe_bus+0x234
pciattach(12bb7f0, 2707a80, 18097f0, 1217ba0, 2729f90, 2729f98) at pciattach+0x2
00
config_attach(2707a80, 140b248, 18097f0, 0, 140fc00, 140a000) at config_attach+0
x3b4
config_found_sm(26e9b00, 18097f0, 12252a4, 0, 2707d00, 2707e00) at config_found_
sm+0x24
psycho_attach(2707f00, 26e9b00, 1809ab0, 122517c, 2729fc0, 2729fc8) at psycho_at
tach+0x118
config_attach(26e9b00, 140b248, 1809ab0, 0, 140fc00, 140a000) at config_attach+0
x3b4
config_found_sm(2707f00, 1809ab0, 124f2ec, 0, 1809ad0, 130c000) at config_found_
sm+0x24
mainbus_attach(130c2e0, 142da48, 130c280, 130c2d8, 130c2c8, 130c290) at mainbus_
attach+0x39c
config_attach(2707f00, 140b248, 0, 0, 140fc00, 140a000) at config_attach+0x3b4
config_rootfound(130c160, 0, 1412f88, 0, 2708e00, 2708e08) at config_rootfound+0
x44
cpu_configure(148e000, 148e020, 140b378, 0, 0, 129f740) at cpu_configure+0x3c
configure(14b0c00, 14b0800, 14b0800, 14aec00, fffffffffffffc00, 3ae50000) at con
figure+0x50
main(1489c00, 148cc00, 14b3400, 20000, 142d800, 0) at main+0x410
cpu_initialize(14097b0, 0, 1000000, e0000000, 3f400076, 100a4d8) at cpu_initiali
ze+0x3f8
db>

> 
> 	Below is output of boot, followed by trace, then prtconf -pv at the
> 	very bottom.
> 
> 	Resetting ...
> 
> 
> 	Sun (TM) Enterprise 250 (2 X UltraSPARC-II 400MHz), Keyboard Present
> 	OpenBoot 3.16, 1024 MB memory installed, Serial #15128240.
> 	Ethernet address 8:0:20:e6:d6:b0, Host ID: 80e6d6b0.
> 
> [...]
> 	flashprom at ebus0 addr 0-fffff addr 0-fffff not configured
> 	SUNW,envctrltwo at ebus0 addr 600000-600003 ipl 40 ipl 37 not configure
> d
> 	hme1 at pci0 dev 1 function 1: address 08:00:20:e6:d6:b0
> 	nsphy0 at hme1 phy 1: DP83840 10/100 media interface, rev. 1
> 	nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
> 	panic: psycho_intr_map: line line < 0 || line > 0x32
> 	kdb breakpoint at 1262dd0
> 	1 tt=1ff tstate=0 tpc=0x0 tnpc=0x0
> 	Stopped in pid 0 (swapper) at   cpu_Debugger+0x4:       nop
> 	db> trace
> 	psycho_intr_map(900, 0, ef, 180922c, 0, 0) at psycho_intr_map+0x18
> 	pci_intr_map(0, 180922c, 0, 2733b68, e0030000, 2733bc8) at pci_intr_map
> +0x84
> 	hmeattach_pci(2707a80, 2733800, 1809490, 1224ee0, 2729d10, 2729d18) at 
> hmeattach
> 	_pci+0x130
> 	config_attach(2733800, 140b248, 1809490, 0, 140fc00, 140a000) at config
> _attach+0
> 	x3b4
> 	config_found_sm(2707a80, 1809490, 1217db0, 1217f88, 50a00ef, 0) at conf
> ig_found_
> 	sm+0x24
> 	pci_probe_bus(2707a80, 8, ffff, 2, 2707d00, 2707c80) at pci_probe_bus+0
> x234
> 
> It looks like it had some difficulty tracking down how the interrupts
> were wired in your hme NIC.  Is that hme on-board or in a card?  I think
> it's strange that this is hme1 but you don't seem to have any hme0.
> 
> The code that associates interrupts with devices is rather
> convoluted.  The Sun PCI devices do not set the PCI interrupt
> register, so the psycho attach code does.  It appears that
> something went wrong and that register may not have been 
> properly set.  To generate a bit more output, could you
> break into DDB and set `sparc_pci_debug' to 0xff?
> 
> Eduardo