Subject: Re: netbsd-1-6 branch vs. recent esp(4) fixes....
To: NetBSD/sparc Discussion List <port-sparc@NetBSD.ORG>
From: Greg A. Woods <woods@weird.com>
List: port-sparc
Date: 10/25/2002 22:36:15
[ On Wednesday, October 23, 2002 at 20:12:15 (-0400), Greg A. Woods wrote: ]
> Subject: Re: netbsd-1-6 branch vs. recent esp(4) fixes....
>
> OK, I'll try copying over the changes to my 1.6.x directory and see if I
> can test those changes on an SS20 where I can power cycle this external
> drive to simulate the problem it has and see if it'll come back online.

OK, I'm one step closer.

I had to put back in the TAILQ_INIT(&mlist) in iommu_attach().  I.e. I
had to undo this change (or else I would have had to pull up uvm changes)
----------------------------
revision 1.64
date: 2002/06/02 14:44:39;  author: drochner;  state: Exp;  lines: +1 -2
move initialization of the "struct pglist" returned by uvm_pglistalloc()
from the calling code into uvm_pglistalloc() itself for consistency
and easier error handling
----------------------------

This crash though has me a little more confused.  I'll check over all
the changes I've got in my tree now, but I thought I'd found everything
which might be related to this:
----------------------------
revision 1.22
date: 2002/03/11 16:27:01;  author: pk;  state: Exp;  lines: +4 -6
* `bus_type_t' is gone.
* Use BUS_ADDR() where appropriate to encode I/O space and physical
  address offset into a `bus_addr_t' value.
* Drop obio_bus_map() since it's now completely equivalent to bus_space_map()
* Use bus_space_map2() to map device space at a fixed virtual address.
* Remove the virtual address argument from sbus_sbus_addr()
----------------------------

hmmm... perhaps not since that same comment is in the log for
if_le_obio.c and similar comments in files in sys/dev/sbus that I
haven't yet pulled up....  I guess my wild goose chase is still on...

Rebooting with command: 
Boot device: /iommu/sbus/espdma@f,400000/esp@f,800000/sd@0,0  File and args: netbsd
>> NetBSD/sparc Secondary Boot, Revision 1.9
>> (woods@sometimes, Tue Mar 27 17:22:23 EST 2001)
Booting netbsd
2108931+84608+446908[68+142720+112030=0x2d2f6c]
OBP version 3, revision 2.19 (plugin rev 2)
[ using 255272 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_STABLE (SOMETIMES) #3: Fri Oct 25 21:46:09 EDT 2002
    woods@sometimes:/proven/work/woods/NetBSD-1.6/sys/arch/sparc/compile/SOMETIMES
total memory = 287 MB
nbuf at 7350 is too large for VM_MAX_KERNEL_BUF... adjusted to 896
avail memory = 248 MB
using 896 buffers containing 29400 KB of memory
bootpath: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,0
mainbus0 (root): SUNW,Axil-320
cpu0 at mainbus0: TMS390Z50 v0 or TMS390Z55 @ 75 MHz, on-chip FPU
cpu0: physical 20K instruction (64 b/l), 16K data (32 b/l), 1024K external (32 b/l): cache enabled
obio0 at mainbus0
clock0 at obio0 slot 0 offset 0x200000: mk48t08: hostid 72971942
timer0 at obio0 slot 0 offset 0x300000: delay constant 35
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0 (console i/o)
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
kbd0 at zs1 channel 0: baud rate 1200
ms0 at zs1 channel 1: baud rate 1200
fdc0 at obio0 slot 0 offset 0x700000 level 11 softpri 4: chip 82077
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x1/0x1, page-size 4096, range 64MB
sbus0 at iommu0: clock = 25 MHz
dma0 at sbus0 slot 15 offset 0x400000: dma rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: dma rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6trap type 0x7: pc=0xf017e694 npc=0xf017e698 psr=40401fc2<EF,S,PS>
kernel: alignment fault trap
Stopped in pid 0 (swapper) at   uvm_pglistalloc+0x3a8:  st              %i0, [%o1 + %g0]
db> trace
_bus_dmamem_alloc(0xf0823b30, 0x4000, 0x0, 0x1000000, 0xf021e448, 0x1) at _bus_dmamem_alloc+0x6c
leattach_ledma(0xf085f000, 0xf0889000, 0xf021e5b0, 0xf018a8f4, 0x20, 0xf08892b8) at leattach_ledma+0x118
config_attach(0xf0889000, 0xf021f880, 0xf021e5b0, 0xf018a2b4, 0xf021e5d4, 0x1) at config_attach+0x288
config_found_sm(0xf085f000, 0xf021e5b0, 0xf018a2b4, 0x0, 0xf021e5b0, 0x0) at config_found_sm+0x24
dmaattach_sbus(0xf0828b00, 0xf085f000, 0xf018a000, 0xf018a330, 0x20, 0xf085f084) at dmaattach_sbus+0x214
config_attach(0xf085f000, 0xf021f880, 0xf021e728, 0xf018c870, 0xf021e74c, 0x1) at config_attach+0x288
config_found_sm(0xf0828b00, 0xf021e728, 0xf018c870, 0x0, 0xf021e728, 0x404010e3) at config_found_sm+0x24
sbus_attach_common(0xf0828b00, 0xf0228000, 0x0, 0x0, 0xf01fa6c8, 0x0) at sbus_attach_common+0x1f8
sbus_attach_iommu(0xf0828b80, 0xf0828b00, 0xf0228364, 0xf018ca38, 0x20, 0xf0828b48) at sbus_attach_iommu+0x12c
config_attach(0xf0828b00, 0xf021f880, 0xf021e920, 0xf0180ff4, 0xffffffff, 0xc) at config_attach+0x288
config_found_sm(0xf0828b80, 0xf021e920, 0xf0180ff4, 0x0, 0xf021e930, 0xf021e938) at config_found_sm+0x24
iommu_attach(0xf0884fc0, 0xf0828b80, 0xf021eaf0, 0xf018103c, 0x20, 0xf0828bc8) at iommu_attach+0x448
config_attach(0xf0828b80, 0xf021f880, 0xf021eaf0, 0xf01a9fe0, 0xf021ea40, 0x8) at config_attach+0x288
config_found_sm(0xf0884fc0, 0xf021eaf0, 0xf01a9fe0, 0x0, 0x0, 0xe0000000) at config_found_sm+0x24
mainbus_attach(0xf0228000, 0xf0884fc0, 0xf0228000, 0xf0201380, 0x20, 0xf0884fec) at mainbus_attach+0x444
config_attach(0xf0884fc0, 0xf021f880, 0x0, 0x0, 0x0, 0xf0296750) at config_attach+0x288
config_rootfound(0xf0201308, 0x0, 0xf01af948, 0xf01f05f8, 0x20, 0xf08225c4) at config_rootfound+0x40
cpu_configure(0x1000, 0xf028ea38, 0xf028bc00, 0x0, 0x0, 0xf01edc08) at cpu_configure+0x38
configure(0x2728, 0x26b5, 0xf021f800, 0x4a40, 0xffffffff, 0x76c0) at configure+0x54
main(0x0, 0xfffffff8, 0x0, 0x0, 0x38b908, 0xf0002208) at main+0x3d8
startmap_done(0x388110, 0x3951b0, 0x387eb4, 0x0, 0x397400, 0xffffffff) at startmap_done+0x12c
db> machine prom
Type  'go' to resume
Type  help  for more information
ok boot disk3 netbsd.old -s
Resetting ... 


-- 
								Greg A. Woods

+1 416 218-0098;            <g.a.woods@ieee.org>;           <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>