Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2014 21:14:54 +0200 (CEST)
From:      Gilles DALMAS <gdalmas@wanadoo.fr>
To:        Ganbold Tsagaankhuu <ganbold@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: kernel debugger on cubietruck
Message-ID:  <857916216.19088.1411240494803.JavaMail.www@wwinf1p21>
In-Reply-To: <139071258.18161.1411238741408.JavaMail.www@wwinf1p20>
References:  <568188637.10901.1411218668061.JavaMail.www@wwinf1p20> <CAP=KkTwhRpJRW8jTLCjYRf55RLc-xSi%2BFCEBd5WHpU0hn-bUmQ@mail.gmail.com> <1886035707.11136.1411219513483.JavaMail.www@wwinf1p20> <CAGtf9xNnNavZLsSkTEpku187z7cCA%2BtgmXNODa3UQJZ4Kncqcg@mail.gmail.com> <284420224.12277.1411223197278.JavaMail.www@wwinf1p20> <584735728.12399.1411223474805.JavaMail.www@wwinf1p20> <CAGtf9xNRanWo1F_hY4KHWCWDUNfNn=bcq__qxT-i2YbJCgE%2BWA@mail.gmail.com> <139071258.18161.1411238741408.JavaMail.www@wwinf1p20>

next in thread | previous in thread | raw e-mail | index | archive | help
the network interface is not detected






> Message du 20/09/14 20:45
> De : "Gilles DALMAS"=20
> A : "Ganbold Tsagaankhuu"=20
> Copie =C3=A0 : "freebsd-arm"=20
> Objet : Re: kernel debugger on cubietruck
>=20
> when I try to put "ufs: / dev / da0", the system starts but I have a lot =
of "no such device" and "spurious interrupt detected" > Message du 20/09/14=
 16:35 > De : "Ganbold Tsagaankhuu" > A : "Gilles DALMAS" > Copie =C3=A0 : =
> Objet : Re: kernel debugger on cubietruck > > > > On Sat, Sep 20, 2014 at=
 10:31 PM, Gilles DALMAS wrote: > > no need to re make the kernel-toolchain=
 ? > > No just build kernel only. > Ganbold =C2=A0 > > > > > > Message du 2=
0/09/14 16:26 > > De : "Gilles DALMAS" > > A : "Ganbold Tsagaankhuu" > > Co=
pie =C3=A0 : "freebsd-arm@freebsd.org" > > Objet : Re: kernel debugger on c=
ubietruck > > > > i comment emac line from : # Ethernet device=C2=A0=C2=A0=
=C2=A0 =C2=A0=C2=A0=C2=A0 loop device=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =
ether device=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 mii device=C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 smscphy #device =C2=A0=C2=A0=C2=A0 cpsw device=C2=A0=
=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 bpf device=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=
=C2=A0 emac # USB ethernet support, requires miibus device=C2=A0=C2=A0=C2=
=A0 =C2=A0=C2=A0=C2=A0 miibus =C2=A0 and re run the compilation ? =C2=A0 =
=C2=A0 no need to re created the sd card ? just the USB flash ? =C2=A0 > Me=
ssage du 20/09/14 16:09 > De : "Ganbold Tsagaankhuu" > A : "Gilles DALMAS" =
> Copie =C3=A0 : "freebsd-arm@freebsd.org" > Objet : Re: kernel debugger on=
 cubietruck > > > > On Sat, Sep 20, 2014 at 9:25 PM, Gilles DALMAS wrote: >=
 I did not know much about debug kernel, but when I pass the trace command,=
 I get: > > db> trace > Tracing pid 0 tid 100000 td 0xc08ba870 > db_trace_s=
elf() at db_trace_self > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 p=
c =3D 0xc04eba6c=C2=A0 lr =3D 0xc0232780 (db_hex2dec+0x4d8) > =C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5750=C2=A0 fp =3D 0xc08e5=
768 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r10 =3D 0xc08ba1c4 > db_he=
x2dec() at db_hex2dec+0x4d8 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 pc =3D 0xc0232780=C2=A0 lr =3D 0xc02320f0 (db_command_loop+0x2fc) > =C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5770=C2=A0 fp =
=3D 0xc08e5810 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0x=
00000000=C2=A0 r5 =3D 0x00000000 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 r6 =3D 0x00000063 > db_command_loop() at db_command_loop+0x2fc > =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =3D 0xc02320f0=C2=A0 lr=
 =3D 0xc0231e54 (db_command_loop+0x60) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 sp =3D 0xc08e5818=C2=A0 fp =3D 0xc08e5828 > =C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0xc0528609=C2=A0 r5 =3D 0xc0540c1c=
 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r6 =3D 0xc08ba1b0=C2=A0=
 r7 =3D 0xc08e5a48 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r8 =
=3D 0x00000001=C2=A0 r9 =3D 0xc05d2918 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 r10 =3D 0xc0615aa4 > db_command_loop() at db_command_loop+0x60 > =
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =3D 0xc0231e54=C2=A0 lr=
 =3D 0xc023481c (X_db_symbol_values+0x250) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5830=C2=A0 fp =3D 0xc08e5950 > =C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0x00000000=C2=A0 r5 =3D 0xc08ba=
1bc > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r6 =3D 0xc0615ac8 > =
X_db_symbol_values() at X_db_symbol_values+0x250 > =C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0 pc =3D 0xc023481c=C2=A0 lr =3D 0xc0352c88 (kdb_tra=
p+0x15c) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e59=
58=C2=A0 fp =3D 0xc08e5978 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 r4 =3D 0x00000000=C2=A0 r5 =3D 0x00000005 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 r6 =3D 0xc0615ac8=C2=A0 r7 =3D 0xc08e5a48 > kdb_trap(=
) at kdb_trap+0x15c > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =
=3D 0xc0352c88=C2=A0 lr =3D 0xc050138c (data_abort_handler+0x680) > =C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5980=C2=A0 fp =3D 0=
xc08e5998 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0xc08e5=
a48=C2=A0 r5 =3D 0x00000005 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 r6 =3D 0x600001d3=C2=A0 r7 =3D 0x00000000 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 r8 =3D 0x00000013=C2=A0 r9 =3D 0xc08e5a48 > =C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r10 =3D 0x00000001 > data_abort_handler()=
 at data_abort_handler+0x680 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0 pc =3D 0xc050138c=C2=A0 lr =3D 0xc0501134 (data_abort_handler+0x428)=
 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e59a0=C2=A0=
 fp =3D 0xc08e5a40 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =
=3D 0xc08e5eb0=C2=A0 r5 =3D 0xc08ba870 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0 r6 =3D 0xc08ba548=C2=A0 r7 =3D 0x00000005 > data_abort_hand=
ler() at data_abort_handler+0x428 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 pc =3D 0xc0501134=C2=A0 lr =3D 0xc04ed754 (exception_exit) > =C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5a48=C2=A0 fp =
=3D 0xc08e5ab0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0x=
c3b49f00=C2=A0 r5 =3D 0xc3b4a080 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 r6 =3D 0xc3b4a0b8=C2=A0 r7 =3D 0x00000000 > =C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0 r8 =3D 0xc056b038=C2=A0 r9 =3D 0xc3ae1700 > =C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r10 =3D 0xc05d4930 > exception_exit=
() at exception_exit > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =
=3D 0xc04ed754=C2=A0 lr =3D 0xc024e0f0 (mii_phy_flowstatus+0x2080) > =C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5a98=C2=A0 fp =3D 0=
xc08e5ab0 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r0 =3D 0x00000=
000=C2=A0 r1 =3D 0xc0547c85 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0 r2 =3D 0x00000072=C2=A0 r3 =3D 0x00000008 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0xc3b49f00=C2=A0 r5 =3D 0xc3b4a080 > =C2=A0=C2=
=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r6 =3D 0xc3b4a0b8=C2=A0 r7 =3D 0x00=
000000 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r8 =3D 0xc056b038=
=C2=A0 r9 =3D 0xc3ae1700 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r10 =
=3D 0xc05d4930 r12 =3D 0x00000000 > strcmp() at strcmp+0x4 > =C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =3D 0xc03d7604=C2=A0 lr =3D 0xc024e=
0f0 (mii_phy_flowstatus+0x2080) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=
=A0=C2=A0 sp =3D 0xc08e5a98=C2=A0 fp =3D 0xc08e5ab0 > Unwind failure (no re=
gisters changed) > > Please try without=C2=A0emac=C2=A0driver. MII in Cubie=
truck=C2=A0could be different. > > Ganbold > > =C2=A0 > > > =C2=A0 > > > Me=
ssage du 20/09/14 15:13 > > De : "Boris Astardzhiev" > > A : "Gilles DALMAS=
" > > Copie =C3=A0 : freebsd-arm@freebsd.org > > Objet : Re: kernel debugge=
r on cubietruck > > > > > > Hi, > > > As far as I see strcmp() is passed a =
NULL pointer, try issuing a backtrace to get the exact place of calling. > =
> > Regards > > On Sep 20, 2014 4:11 PM, "Gilles DALMAS"=C2=A0 wrote: > > h=
i, > > > > =C2=A0 > > > > I would compile freebsd for it run on a cubietruc=
k. For this I used the wiki page: https://wiki.freebsd.org/FreeBSD/arm/Cubi=
eboard using option confifuration "CUBIEBOARD2." everything goes well, but =
starting on the "truck", I get this message: > > > > =C2=A0 > > > > vm_faul=
t(0xc08bab80, 0, 1, 0) -> 1 > > Fatal kernel mode data abort: 'Translation =
Fault (S)' > > trapframe: 0xc08e5a48 > > FSR=3D00000005, FAR=3D00000000, sp=
sr=3Da00001d3 > > r0 =3D00000000, r1 =3Dc0547c85, r2 =3D00000072, r3 =3D000=
00008 > > r4 =3Dc3b49f00, r5 =3Dc3b4a080, r6 =3Dc3b4a0b8, r7 =3D00000000 > =
> r8 =3Dc056b038, r9 =3Dc3ae1700, r10=3Dc05d4930, r11=3Dc08e5ab0 > > r12=3D=
00000000, ssp=3Dc08e5a98, slr=3Dc024e0f0, pc =3Dc03d7604 > > > > [ thread p=
id 0 tid 100000 ] > > Stopped at=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 strcmp+0x4:=
=C2=A0=C2=A0=C2=A0=C2=A0 ldrb=C2=A0=C2=A0=C2=A0 r3, [r0] > > > > > > > > wh=
ere is the problem please ? > > > > _______________________________________=
________ > > freebsd-arm@freebsd.org mailing list > > http://lists.freebsd.=
org/mailman/listinfo/freebsd-arm > > To unsubscribe, send any mail to "free=
bsd-arm-unsubscribe@freebsd.org" > > ______________________________________=
_________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org=
/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-a=
rm-unsubscribe@freebsd.org" > _____________________________________________=
__ freebsd-arm@freebsd.org mailing list http://lists.freebsd.org/mailman/li=
stinfo/freebsd-arm To unsubscribe, send any mail to "freebsd-arm-unsubscrib=
e@freebsd.org" > _______________________________________________ freebsd-ar=
m@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebs=
d-arm To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org=
"
From owner-freebsd-arm@FreeBSD.ORG  Sat Sep 20 19:24:17 2014
Return-Path: <owner-freebsd-arm@FreeBSD.ORG>
Delivered-To: freebsd-arm@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id E98EFEE5;
 Sat, 20 Sep 2014 19:24:17 +0000 (UTC)
Received: from mho-02-ewr.mailhop.org (mho-02-ewr.mailhop.org [204.13.248.72])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 61AE3F48;
 Sat, 20 Sep 2014 19:24:17 +0000 (UTC)
Received: from [73.34.117.227] (helo=ilsoft.org)
 by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256)
 (Exim 4.72) (envelope-from <ian@FreeBSD.org>)
 id 1XVQGQ-0001If-DY; Sat, 20 Sep 2014 19:24:10 +0000
Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240])
 by ilsoft.org (8.14.9/8.14.9) with ESMTP id s8KJO9qr016862;
 Sat, 20 Sep 2014 13:24:09 -0600 (MDT) (envelope-from ian@FreeBSD.org)
X-Mail-Handler: Dyn Standard SMTP by Dyn
X-Originating-IP: 73.34.117.227
X-Report-Abuse-To: abuse@dyndns.com (see
 http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse
 reporting information)
X-MHO-User: U2FsdGVkX1/hPFpEMvfkAv00kf34fk4v
X-Authentication-Warning: paranoia.hippie.lan: Host revolution.hippie.lan
 [172.22.42.240] claimed to be [172.22.42.240]
Subject: Re: FreeBSD-11.0-CURRENT on ARM: performance and load average
From: Ian Lepore <ian@FreeBSD.org>
To: Maxim V FIlimonov <che@bein.link>
In-Reply-To: <7351653.A2UeEk9AA3@quad>
References: <7351653.A2UeEk9AA3@quad>
Content-Type: multipart/mixed; boundary="=-z+3p5YfilYZLalC+jqRC"
Date: Sat, 20 Sep 2014 13:24:08 -0600
Message-ID: <1411241048.66615.148.camel@revolution.hippie.lan>
Mime-Version: 1.0
X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port 
Cc: freebsd-arm@freebsd.org, freebsd-current@freebsd.org, mav@freebsd.org
X-BeenThere: freebsd-arm@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: "Porting FreeBSD to ARM processors." <freebsd-arm.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-arm/>;
List-Post: <mailto:freebsd-arm@freebsd.org>
List-Help: <mailto:freebsd-arm-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-arm>,
 <mailto:freebsd-arm-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Sep 2014 19:24:18 -0000


--=-z+3p5YfilYZLalC+jqRC
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

On Sat, 2014-09-20 at 22:44 +0400, Maxim V FIlimonov wrote:
> Hello everyone,
> 
> Recently, I encountered a problem with -CURRENT on an ARM board (cubieboard2 
> to be precise). The problem was that the load average was above 2. Including 
> the fact that the board has 2 CPU cores, that's strange. Also, the network 
> throughput was way too slow: from 3 kilobytes per second earlier to 20..50 
> about now. 
> 
> Here's a workaround for that:
> > sysctl kern.eventtimer.periodic=1
> With that, the network performance increased while LA decreased to a decent 
> 0.3..0.5.

Since it's happening only on that hardware, there's a good chance the
problem is in the allwinner a10/a20 clock driver, not in the general
eventtimer code.  In fact, looking at the code it appears that a
divide-by-16 is being set in the hardware, but not accounted for when
setting the frequency of the eventtimer.

Hmm, it should affect the timecounter too, in which case you'd see
time-of-day advancing 16x too fast.  If ntpd is running it would need to
step the clock pretty frequently, which would show up in syslog.

I don't have hardware to test on, please see if the attached patch makes
a difference.

-- Ian


--=-z+3p5YfilYZLalC+jqRC
Content-Disposition: inline; filename="allwinner_timer.diff"
Content-Type: text/x-patch; name="allwinner_timer.diff"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Index: sys/arm/allwinner/timer.c
===================================================================
--- sys/arm/allwinner/timer.c	(revision 271909)
+++ sys/arm/allwinner/timer.c	(working copy)
@@ -199,7 +199,7 @@ a10_timer_attach(device_t dev)
 	val |= TIMER_ENABLE;
 	timer_write_4(sc, SW_TIMER_IRQ_EN_REG, val);
 
-	sc->timer0_freq = SYS_TIMER_CLKSRC;
+	sc->timer0_freq = SYS_TIMER_CLKSRC / 16;
 
 	/* Set desired frequency in event timer and timecounter */
 	sc->et.et_frequency = sc->timer0_freq;

--=-z+3p5YfilYZLalC+jqRC--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?857916216.19088.1411240494803.JavaMail.www>