NetBSD Problem Report #41650
From www@NetBSD.org Tue Jun 30 07:10:49 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id 3DFA863B976
for <gnats-bugs@gnats.netbsd.org>; Tue, 30 Jun 2009 07:10:49 +0000 (UTC)
Message-Id: <20090630071048.E2DC663B946@www.NetBSD.org>
Date: Tue, 30 Jun 2009 07:10:48 +0000 (UTC)
From: pettai@nordu.net
Reply-To: pettai@nordu.net
To: gnats-bugs@NetBSD.org
Subject: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
X-Send-Pr-Version: www-1.0
>Number: 41650
>Category: port-evbmips
>Synopsis: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-evbmips-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 30 07:15:00 +0000 2009
>Closed-Date:
>Last-Modified: Tue Nov 16 21:14:44 +0000 2010
>Originator: Fredrik Pettai
>Release: 5.99.14
>Organization:
NORDUnet A/S
>Environment:
NetBSD 5.99.14 (MERAKI) #2: Mon Jun 29 23:45:54 CEST 2009
root@netbsd5.99.11:/usr/obj/sys/arch/evbmips/compile/MERAKI
>Description:
NetBSD/evbmips 5.99.14 MERAKI on Atheros 2315 WiSoC crashes during boot on a FON2100 (La Fonera). The hardware is almost identical to the MERAKI, just a few things are added to the kernel to support this H/W platform.
Add Atheros 5312 support and hal_debug + com baud speed 9600 to the MERAKI kernel conf
options ATHHAL_DEBUG
options ATHHAL_AR5312
options COM_ARBUS_BAUD=9600
Crosscompile the kernel for evbmips
Load the kernel on your FON2100 (ap51), and boot.
RedBoot> go
MIPS32/64 params: cpu arch: 32
MIPS32/64 params: TLB entries: 16
MIPS32/64 params: Icache: line = 16, total = 16384, ways = 4
sets = 256
MIPS32/64 params: Dcache: line = 16, total = 16384, ways = 4
sets = 256
picache_stride = 4096
picache_loopcount = 4
pdcache_stride = 4096
pdcache_loopcount = 4
Memory size: 0x01000000
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008, 2009
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 5.99.14 (MERAKI) #2: Mon Jun 29 23:45:54 CEST 2009
root@netbsd5.99.11:/usr/obj/sys/arch/evbmips/compile/MERAKI
Atheros AR2315
total memory = 16384 KB
avail memory = 12996 KB
mainbus0 (root)
cpu0 at mainbus0: 184.00MHz (hz cycles = 920000, delay divisor = 92)
cpu0: MIPS 4KEc (Rev 2) (0x19064) Rev. 100 with software emulated floating point
cpu0: 16KB/16B 4-way set-associative L1 Instruction cache, 16 TLB entries
cpu0: 16KB/16B 4-way set-associative write-back L1 Data cache
wdog0 at mainbus0: 5 second period
arbus0 at mainbus0
com0 at arbus0 addr 0x11100000 cpu irq 0 misc irq 0: ns16550a, working fifo
com0: console
ae0 at arbus0 addr 0x10500000 cpu irq 2: Atheros AR531X 10/100 Ethernet
ae0: Ethernet address 00:18:84:1b:65:10
ukphy0 at ae0 phy 0: Generic IEEE 802.3u media interface
ukphy0: AC101L 10/100 media interface (OUI 0x0010a9, model 0x0012), rev. 1
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ae0: WARNING: powerhook_establish is deprecated
ath0 at arbus0 addr 0x10000000 cpu irq 1: Atheros 2315 WiSoC
trap: address error (load or I-fetch) in kernel mode
status=0x2, cause=0x50008010, epc=0x1bb958f6, vaddr=0x1bb958f6
pid=0 cmd=system usp=0x0 ksp=0x802feb60
Stopped in pid 0.1 (system) at 0x1bb958f6: invalid address.
db>
More info & background in this thread as well:
http://mail-index.netbsd.org/port-evbmips/2009/06/28/msg000061.html
>How-To-Repeat:
Crosscompile tools for evbmips:
# ./build.sh -m evbmips-eb tools
Add Atheros 5312 support + com baud speed 9600 to the MERAKI kernel conf
--- /usr/src/sys/external/isc/atheros_hal/conf/std.ath_hal.orig 2009-06-30 08:56:37.000000000 +0200
+++ /usr/src/sys/external/isc/atheros_hal/conf/std.ath_hal 2009-06-29 23:43:35.000000000 +0200
@@ -1,5 +1,5 @@
#options ATHHAL_ASSERT
-#options ATHHAL_DEBUG
+options ATHHAL_DEBUG
#options ATHHAL_DEBUG_ALQ
# Atheros HAL Chipset Support
@@ -8,10 +8,10 @@
options ATHHAL_AR5211
options ATHHAL_AR5212
options ATHHAL_AR5311
-#options ATHHAL_AR5312
+options ATHHAL_AR5312
#options ATHHAL_AR2316
#options ATHHAL_AR2317
--- /usr/src/sys/arch/evbmips/conf/MERAKI.orig 2009-03-06 21:31:48.000000000 +0100
+++ /usr/src/sys/arch/evbmips/conf/MERAKI 2009-06-29 05:27:38.000000000 +0200
@@ -15,6 +15,7 @@
options NOFPU # No FPU
options SOFTFLOAT # emulate FPU insn
options WISOC_AR5315 # WiSoc select
+options COM_ARBUS_BAUD=9600
# Options for necessary to use MD
#options MEMORY_DISK_HOOKS
Crosscompile the kernel for evbmips:
# ./build.sh -m evbmips-eb kernel=MERAKI
Load the kernel on your FON2100, and boot.
You will see the same output as described above.
>Fix:
>Release-Note:
>Audit-Trail:
From: Havard Eidnes <he@NetBSD.org>
To: pettai@nordu.net
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Tue, 30 Jun 2009 09:24:21 +0200 (CEST)
> ath0 at arbus0 addr 0x10000000 cpu irq 1: Atheros 2315 WiSoC
> trap: address error (load or I-fetch) in kernel mode
> status=0x2, cause=0x50008010, epc=0x1bb958f6, vaddr=0x1bb958f6
> pid=0 cmd=system usp=0x0 ksp=0x802feb60
> Stopped in pid 0.1 (system) at 0x1bb958f6: invalid address.
> db>
"trace" output, please?
Regards,
- Havard
From: Fredrik Pettai <pettai@nordu.net>
To: Havard Eidnes <he@NetBSD.org>
Cc: gnats-bugs@NetBSD.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
Date: Tue, 30 Jun 2009 22:35:57 +0200
On Jun 30, 2009, at 9:24 AM, Havard Eidnes wrote:
>> ath0 at arbus0 addr 0x10000000 cpu irq 1: Atheros 2315 WiSoC
>> trap: address error (load or I-fetch) in kernel mode
>> status=0x2, cause=0x50008010, epc=0x1bb958f6, vaddr=0x1bb958f6
>> pid=0 cmd=system usp=0x0 ksp=0x802feb60
>> Stopped in pid 0.1 (system) at 0x1bb958f6: invalid address.
>> db>
>
> "trace" output, please?
db> trace
PC 0x1bb958f6: not in kernel space
0+1bb958f6 (a87f0000,b0000000,c003020,4) ra 0 sz 0
User-level: pid 0.1
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, pettai@nordu.net
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Wed, 1 Jul 2009 05:25:09 +0000
On Tue, Jun 30, 2009 at 08:40:03PM +0000, Fredrik Pettai wrote:
> > "trace" output, please?
>
> db> trace
> PC 0x1bb958f6: not in kernel space
> 0+1bb958f6 (a87f0000,b0000000,c003020,4) ra 0 sz 0
> User-level: pid 0.1
oh joy.
'show registers'?
--
David A. Holland
dholland@netbsd.org
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Wed, 1 Jul 2009 05:53:55 +0000
On Tue, Jun 30, 2009 at 07:15:00AM +0000, pettai@nordu.net wrote:
> status=0x2, cause=0x50008010
These values make no sense - are you sure you transcribed them
correctly?
--
David A. Holland
dholland@netbsd.org
From: Fredrik Pettai <pettai@nordu.net>
To: David Holland <dholland-bugs@NetBSD.org>
Cc: gnats-bugs@netbsd.org,
port-evbmips-maintainer@netbsd.org,
gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
Date: Wed, 1 Jul 2009 08:14:52 +0200
On Jul 1, 2009, at 7:25 AM, David Holland wrote:
> On Tue, Jun 30, 2009 at 08:40:03PM +0000, Fredrik Pettai wrote:
>>> "trace" output, please?
>>
>> db> trace
>> PC 0x1bb958f6: not in kernel space
>> 0+1bb958f6 (a87f0000,b0000000,c003020,4) ra 0 sz 0
>> User-level: pid 0.1
>
> oh joy.
>
> 'show registers'?
db> show registers
at 0xffffffe0
v0 0
v1 0x2000
a0 0xa87f0000
a1 0xb0000000
a2 0xc003020
a3 0x4
t0 0
t1 0x2
t2 0x14
t3 0xffffffff
t4 0
t5 0
t6 0xffffffff
t7 0xffffffff
s0 0x6004
s1 0xc002e000
s2 0x4004
s3 0xc002e000
s4 0x3
s5 0x80220000
s6 0x802fed08
s7 0x80297900
t8 0x40800000
t9 0x1bb958f6
k0 0
k1 0
gp 0x802a1f90
sp 0x802febe0
fp 0x80fe0fc0
ra 0x8006a524
sr 0x2
mdlo 0x41d661c0
mdhi 0x16e84185
bad 0
cs 0
pc 0x1bb958f6
0x1bb958f6: invalid address.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Wed, 1 Jul 2009 06:45:49 +0000
On Wed, Jul 01, 2009 at 06:20:03AM +0000, Fredrik Pettai wrote:
> > 'show registers'?
>
> db> show registers
> :
> ra 0x8006a524
That's almost certainly the place it jumped off the cliff.
Can you find out where it is? (If it's a kernel with debugging symbols
you can get it from gdb; otherwise the easiest way is to run "objdump
-d netbsd | less", search for 8006a524, look backwards to find the
start of the function, then paste the disassembly of the whole
function here.)
--
David A. Holland
dholland@netbsd.org
From: Fredrik Pettai <pettai@nordu.net>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@NetBSD.org,
gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
Date: Wed, 1 Jul 2009 09:48:12 +0200
>>> 'show registers'?
>>
>> db> show registers
>> :
>> ra 0x8006a524
>
> That's almost certainly the place it jumped off the cliff.
>
> Can you find out where it is? (If it's a kernel with debugging symbols
> you can get it from gdb; otherwise the easiest way is to run "objdump
> -d netbsd | less", search for 8006a524, look backwards to find the
> start of the function, then paste the disassembly of the whole
> function here.)
8006a4b0 <ar5312MacReset>:
8006a4b0: 27bdffd8 addiu sp,sp,-40
8006a4b4: afb40020 sw s4,32(sp)
8006a4b8: afb10014 sw s1,20(sp)
8006a4bc: afbf0024 sw ra,36(sp)
8006a4c0: afb3001c sw s3,28(sp)
8006a4c4: afb20018 sw s2,24(sp)
8006a4c8: afb00010 sw s0,16(sp)
8006a4cc: 8c820010 lw v0,16(a0)
8006a4d0: 00808821 move s1,a0
8006a4d4: 8c430008 lw v1,8(v0)
8006a4d8: 10a00036 beqz a1,8006a5b4 <ar5312MacReset
+0x104>
8006a4dc: 00a0a021 move s4,a1
8006a4e0: 10600006 beqz v1,8006a4fc <ar5312MacReset
+0x4c>
8006a4e4: 24124004 li s2,16388
8006a4e8: 24020001 li v0,1
8006a4ec: 14620031 bne v1,v0,8006a5b4 <ar5312MacReset
+0x104>
8006a4f0: 3c020004 lui v0,0x4
8006a4f4: 0801a941 j 8006a504 <ar5312MacReset+0x54>
8006a4f8: 34520200 ori s2,v0,0x200
8006a4fc: 0801a942 j 8006a508 <ar5312MacReset+0x58>
8006a500: 24032000 li v1,8192
8006a504: 3c030002 lui v1,0x2
8006a508: 8e220014 lw v0,20(s1)
8006a50c: 3c05bc00 lui a1,0xbc00
8006a510: 34a53020 ori a1,a1,0x3020
8006a514: 00a22823 subu a1,a1,v0
8006a518: 02202021 move a0,s1
8006a51c: 0c011a74 jal 800469d0 <ath_hal_reg_read>
8006a520: 02438025 or s0,s2,v1
8006a524: 00403021 move a2,v0
^^^^^^^^^^
8006a528: 24020002 li v0,2
8006a52c: 16820003 bne s4,v0,8006a53c <ar5312MacReset
+0x8c>
8006a530: 00109827 nor s3,zero,s0
8006a534: 0801a951 j 8006a544 <ar5312MacReset+0x94>
8006a538: 00d29025 or s2,a2,s2
8006a53c: 00d31024 and v0,a2,s3
8006a540: 00509025 or s2,v0,s0
8006a544: 8e250014 lw a1,20(s1)
8006a548: 3c10bc00 lui s0,0xbc00
8006a54c: 36103020 ori s0,s0,0x3020
8006a550: 02403021 move a2,s2
8006a554: 02052823 subu a1,s0,a1
8006a558: 0c011aa7 jal 80046a9c <ath_hal_reg_write>
8006a55c: 02202021 move a0,s1
8006a560: 8e250014 lw a1,20(s1)
8006a564: 02202021 move a0,s1
8006a568: 0c011a74 jal 800469d0 <ath_hal_reg_read>
8006a56c: 02052823 subu a1,s0,a1
8006a570: 0c011bb7 jal 80046edc <ath_hal_delay>
8006a574: 24040064 li a0,100
8006a578: 8e250014 lw a1,20(s1)
8006a57c: 02202021 move a0,s1
8006a580: 0c011a74 jal 800469d0 <ath_hal_reg_read>
8006a584: 02052823 subu a1,s0,a1
8006a588: 8e250014 lw a1,20(s1)
8006a58c: 02533024 and a2,s2,s3
8006a590: 02052823 subu a1,s0,a1
8006a594: 0c011aa7 jal 80046a9c <ath_hal_reg_write>
8006a598: 02202021 move a0,s1
8006a59c: 8e250014 lw a1,20(s1)
8006a5a0: 02202021 move a0,s1
8006a5a4: 0c011a74 jal 800469d0 <ath_hal_reg_read>
8006a5a8: 02052823 subu a1,s0,a1
8006a5ac: 0801a96e j 8006a5b8 <ar5312MacReset+0x108>
8006a5b0: 24020001 li v0,1
8006a5b4: 00001021 move v0,zero
8006a5b8: 8fbf0024 lw ra,36(sp)
8006a5bc: 8fb40020 lw s4,32(sp)
8006a5c0: 8fb3001c lw s3,28(sp)
8006a5c4: 8fb20018 lw s2,24(sp)
8006a5c8: 8fb10014 lw s1,20(sp)
8006a5cc: 8fb00010 lw s0,16(sp)
8006a5d0: 03e00008 jr ra
8006a5d4: 27bd0028 addiu sp,sp,40
HTH,
/P
From: Fredrik Pettai <pettai@nordu.net>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@NetBSD.org,
gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
Date: Wed, 1 Jul 2009 21:54:18 +0200
On Jul 1, 2009, at 8:20 AM, Fredrik Pettai wrote:
> On Jul 1, 2009, at 7:25 AM, David Holland wrote:
>> On Tue, Jun 30, 2009 at 08:40:03PM +0000, Fredrik Pettai wrote:
>>>> "trace" output, please?
>>>
>>> db> trace
>>> PC 0x1bb958f6: not in kernel space
>>> 0+1bb958f6 (a87f0000,b0000000,c003020,4) ra 0 sz 0
>>> User-level: pid 0.1
>>
>> 'show registers'?
db> show register
at 0xffffffe0
v0 0
v1 0x2000 _KERNEL_OPT_DDB_HISTORY_SIZE+0x1f9c
a0 0xa87f0000
a1 0xb0000000
a2 0xc003020
a3 0x4 _KERNEL_OPT_AIO+0x3
t0 0
t1 0x2 _KERNEL_OPT_AIO+0x1
t2 0x14 _KERNEL_OPT_AIO+0x13
t3 0xffffffff
t4 0
t5 0
t6 0xffffffff
t7 0xffffffff
s0 0x6004 _KERNEL_OPT_DDB_HISTORY_SIZE+0x5fa0
s1 0xc002e000
s2 0x4004 _KERNEL_OPT_DDB_HISTORY_SIZE+0x3fa0
s3 0xc002e000
s4 0x3 _KERNEL_OPT_AIO+0x2
s5 0x80220000 __func__.8555+0x128
s6 0x80308d08 _prop_array_pool+0x33498
s7 0x802a1540 lwp0
t8 0x40800000
t9 0x1bb958f6
k0 0
k1 0
gp 0x802abbd0 idstate+0x5970
sp 0x80308be0 _prop_array_pool+0x33370
fp 0x80fe0fc0
ra 0x8006a524 ar5312MacReset+0x74
sr 0x2 _KERNEL_OPT_AIO+0x1
mdlo 0x41d661c0
mdhi 0x16e84185
bad 0
cs 0
pc 0x1bb958f6
0x1bb958f6: invalid address.
db>
From: Fredrik Pettai <pettai@nordu.net>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@NetBSD.org,
gnats-admin@NetBSD.org,
netbsd-bugs@NetBSD.org
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes
Date: Sun, 5 Jul 2009 21:43:47 +0200
On Jul 1, 2009, at 9:50 AM, Fredrik Pettai wrote:
>> That's almost certainly the place it jumped off the cliff.
>>
>> Can you find out where it is? (If it's a kernel with debugging
>> symbols
>> you can get it from gdb;
Here's the gdb output instead:
(gdb) list *0x8006a520
0x8006a520 is in ar5312MacReset (/usr/src/sys/external/isc/atheros_hal/
dist/ar5312/ar5312_reset.c:882).
877 return(AH_FALSE);
878 }
879 regMask = ~(resetBB | resetBits);
880
881 /* read before */
882 reg = OS_REG_READ(ah,
883
(AR5312_RSTIMER_BASE - ((uint32_t) ah->ah_sh) + AR5312_RESET));
884
885 if (RCMask == AR_RC_BB) {
886 /* Put baseband in reset */
(gdb)
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Sun, 5 Jul 2009 22:29:46 +0000
On Sun, Jul 05, 2009 at 07:45:02PM +0000, Fredrik Pettai wrote:
> Here's the gdb output instead:
Ok, so it's dying in the Atheros HAL and almost certainly because the
HAL is being compiled without -mno-abicalls.
I don't see why this would be the case though...
--
David A. Holland
dholland@netbsd.org
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: port-evbmips/41650: NetBSD/evbmips -current on MERAKI/Atheros
2315 WiSoC crashes
Date: Mon, 6 Jul 2009 02:03:13 +0000
On Sun, Jul 05, 2009 at 10:30:05PM +0000, David Holland wrote:
> Ok, so it's dying in the Atheros HAL and almost certainly because the
> HAL is being compiled without -mno-abicalls.
Nope, nothing so exotic, just the bus space tag is bad and providing a
garbage function pointer. See port-evbmips.
--
David A. Holland
dholland@netbsd.org
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 14 Nov 2010 08:46:03 +0000
State-Changed-Why:
Did this ever get fixed?
From: Fredrik Pettai <pettai@nordu.net>
To: gnats-bugs@NetBSD.org
Cc: port-evbmips-maintainer@NetBSD.org, netbsd-bugs@NetBSD.org,
gnats-admin@NetBSD.org, dholland@NetBSD.org
Subject: Re: port-evbmips/41650 (NetBSD/evbmips -current on MERAKI/Atheros 2315 WiSoC crashes)
Date: Tue, 16 Nov 2010 12:19:16 +0100
> Did this ever get fixed?
Nope, gdb gave the pointer to where the problem was. But I gave up =
testing since there was no patches created to test something new.
Short summary:
I tried the oldest and newest versions of NetBSD with the open atheros =
hal (at that time 5.99.15?), and the problem was the same. (I also tried =
the old "closed" hal, but that didn't support this chipset).
I could give it a try again with NetBSD-current (will take some time to =
get it up and running again). however, but I doubt it's fixed by itself =
now although I'm not following the commit log, so maybe something has =
been done which I don't know of...=
State-Changed-From-To: feedback->open
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 16 Nov 2010 21:14:44 +0000
State-Changed-Why:
I had the vague recollection that the bus space tag issue had been fixed,
but I think I was thinking of something else. Anyway, it never hurts to
try but if you didn't see a fix go by it probably won't help. Plus current
mips is fairly borked in general right now so it might not work at all...
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.