From owner-freebsd-alpha@FreeBSD.ORG Fri Dec 30 10:02:59 2005 Return-Path: X-Original-To: freebsd-alpha@freebsd.org Delivered-To: freebsd-alpha@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65D4716A41F; Fri, 30 Dec 2005 10:02:59 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4EAA443D4C; Fri, 30 Dec 2005 10:02:58 +0000 (GMT) (envelope-from ru@ip.net.ua) Received: from localhost (rocky.ip.net.ua [82.193.96.2]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jBUA2s3N005815; Fri, 30 Dec 2005 12:02:54 +0200 (EET) (envelope-from ru@ip.net.ua) Received: from tigra.ip.net.ua ([82.193.96.10]) by localhost (rocky.ipnet [82.193.96.2]) (amavisd-new, port 10024) with LMTP id 10639-08; Fri, 30 Dec 2005 12:02:52 +0200 (EET) Received: from heffalump.ip.net.ua (heffalump.ip.net.ua [82.193.96.213]) by tigra.ip.net.ua (8.12.11/8.12.11) with ESMTP id jBUA06xO005753 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 30 Dec 2005 12:00:06 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.ip.net.ua (8.13.4/8.13.4) id jBUA0I0f040885; Fri, 30 Dec 2005 12:00:18 +0200 (EET) (envelope-from ru) Date: Fri, 30 Dec 2005 12:00:18 +0200 From: Ruslan Ermilov To: John Baldwin Message-ID: <20051230100018.GH52756@ip.net.ua> References: <20051228163557.GE563@cicely12.cicely.de> <20051229044909.GG563@cicely12.cicely.de> <200512291140.19610.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="10jrOL3x2xqLmOsH" Content-Disposition: inline In-Reply-To: <200512291140.19610.jhb@freebsd.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new at ip.net.ua Cc: Bernd Walter , alpha@freebsd.org, ticso@cicely.de, freebsd-alpha@freebsd.org Subject: Re: re(4) unaligned panic on -current X-BeenThere: freebsd-alpha@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Alpha List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2005 10:02:59 -0000 --10jrOL3x2xqLmOsH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 29, 2005 at 11:40:17AM -0500, John Baldwin wrote: > On Wednesday 28 December 2005 11:49 pm, Bernd Walter wrote: > > On Wed, Dec 28, 2005 at 11:01:47PM -0500, John Baldwin wrote: > > > On Dec 28, 2005, at 11:35 AM, Bernd Walter wrote: > > > >The same card works fine on an AS4100 running 5.4-STABLE. > > > > > > > >Booting [/boot/kernel/kernel]... > > > >Entering /boot/kernel/kernel at 0xfffffc000033bf00... > > > > ... > > > >re0: port > > > >0x11000-0x110ff mem 0x80320000-0x803200ff irq 0 at device 11.0 on pc= i0 > > > >miibus1: on re0 > > > >rgephy0: on miibus1 > > > >rgephy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, > > > >1000baseTX, 1000baseTX-FDX, auto > > > >re0: Ethernet address: 00:40:f4:d0:8d:eb > > > > > > > >fatal kernel trap: > > > > > > > > trap entry =3D 0x4 (unaligned access fault) > > > > cpuid =3D 0 > > > > faulting va =3D 0xfffffc00008a472b > > > > opcode =3D 0x28 > > > > register =3D 0x12 > > > > pc =3D 0xfffffc00003b0608 > > > > ra =3D 0xfffffc00003b05cc > > > > sp =3D 0xfffffc00007339d0 > > > > usp =3D 0x0 > > > > curthread =3D 0xfffffc000068b008 > > > > pid =3D 0, comm =3D swapper > > > > > > > >[thread pid 0 tid 0 ] > > > >Stopped at re_init_locked+0xd8: jsr ra, > > > >(pv),re_init_locked+0xdc > > > > > > > >db> bt > > > >Tracing pid 0 tid 0 td 0xfffffc000068b008 > > > >re_init_locked() at re_init_locked+0xd8 > > > >re_diag() at re_diag+0x178 > > > > > > My first guess would be Ruslan's IF_LLADDR changes. If so, you can > > > try doing a bcopy to a char array as a workaround similar to the > > > recent changes to de(4) and dc(4) to fix similar panics on Alpha. It > > > might be something else though. If you could pull up gdb on your > > > kernel.debug and do 'l *re_init_locked+0xd8' to see what file/line > > > that corresponds to that would be helpful. > > > > Your guess looks right - will try your bcopy suggestion. > > > > [54]cicely12# gdb kernel.debug > > GNU gdb 6.1.1 [FreeBSD] > > Copyright 2004 Free Software Foundation, Inc. > > GDB is free software, covered by the GNU General Public License, and you > > are welcome to change it and/or distribute copies of it under certain > > conditions. Type "show copying" to see the conditions. > > There is absolutely no warranty for GDB. Type "show warranty" for deta= ils. > > This GDB was configured as "alpha-marcel-freebsd"... > > (gdb) l *re_init_locked+0xd8 > > 0xfffffc00003b0608 is in re_init_locked (../../../dev/re/if_re.c:2127). > > 2122 * Init our MAC address. Even though the chipset > > 2123 * documentation doesn't mention it, we need to enter > > "Config 2124 * register write enable" mode to modify the ID > > registers. 2125 */ > > 2126 CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_WRITECFG); > > 2127 CSR_WRITE_STREAM_4(sc, RL_IDR0, > > 2128 *(u_int32_t *)(&IF_LLADDR(sc->rl_ifp)[0])); > > 2129 CSR_WRITE_STREAM_4(sc, RL_IDR4, > > 2130 *(u_int32_t *)(&IF_LLADDR(sc->rl_ifp)[4])); > > 2131 CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); > > (gdb) >=20 > Hmm, even worse is that IF_LLADDR() might not be valid yet since from the= =20 > trace it looked like re_diag() was being called from re_attach() and thus= =20 > likely before ether_ifattach(). You'll have to somehow get the copy of t= he=20 > MAC address via the softc if this function is called too early like I did= for=20 > de(4). Try the bcopy first though. >=20 What do you mean? 1236 /* 1237 * Call MI attach routine. 1238 */ 1239 ether_ifattach(ifp, eaddr); 1240=20 1241 /* Perform hardware diagnostic. */ 1242 error =3D re_diag(sc); --=20 Ruslan Ermilov ru@FreeBSD.org FreeBSD committer --10jrOL3x2xqLmOsH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDtQUyqRfpzJluFF4RAo2hAJ4nULUKQ2AoPLkbfEpYlyDVFfRzwwCdF5PK WegSfimrWxi3vssPwMHXLJA= =9mqd -----END PGP SIGNATURE----- --10jrOL3x2xqLmOsH--