Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Sep 2014 15:14:06 +0200 (CEST)
From:      Gilles DALMAS <gdalmas@wanadoo.fr>
To:        freebsd-arm@freebsd.org
Subject:   re: kernel debugger on cubietruck
Message-ID:  <689666083.10970.1411218847015.JavaMail.www@wwinf1p20>
In-Reply-To: <568188637.10901.1411218668061.JavaMail.www@wwinf1p20>
References:  <568188637.10901.1411218668061.JavaMail.www@wwinf1p20>

next in thread | previous in thread | raw e-mail | index | archive | help
the complete sequence :

sun7i#fatload mmc 0 0x40200000 kernel; go 0x40200100
reading kernel
5059739 bytes read in 223 ms (21.6 MiB/s)
## Starting application at 0x40200100 ...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2014 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
=C2=A0=C2=A0=C2=A0 The Regents of the University of California. All rights =
reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 11.0-CURRENT #0 r271768: Thu Sep 18 16:06:02 CEST 2014
=C2=A0=C2=A0=C2=A0 root@CTBSD:/usr/obj/arm.armv6/usr/home/gilles/FBSD/sys/C=
UBIEBOARD2 arm
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
WARNING: WITNESS option enabled, expect reduced performance.
CPU: Cortex A7 rev 4 (Cortex-A core)
=C2=A0Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext
=C2=A0WB disabled EABT branch prediction enabled
LoUU:2 LoC:2 LoUIS:2=20
Cache level 1:=20
=C2=A032KB/64B 4-way data cache WB Read-Alloc Write-Alloc
=C2=A032KB/32B 2-way instruction cache Read-Alloc
Cache level 2:=20
=C2=A0256KB/64B 8-way unified cache WB Read-Alloc Write-Alloc
real memory=C2=A0 =3D 1073741824 (1024 MB)
avail memory =3D 1040261120 (992 MB)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
random device not loaded; using insecure entropy
random:  initialized
ofwbus0:=20
simplebus0:  on ofwbus0
gic0:  mem 0x1c81000-0x1c81fff,0x1c82000-0x1c820ff on simplebus0
gic0: pn 0x10, arch 0x2, rev 0x1, implementer 0x43b sc->nirqs 160
a10_sramc0:  mem 0x1c00000-0x1c00fff on simplebus0
a20_cpu_cfg0:  mem 0x1c25c00-0x1c25fff on simplebus0
a10_ccm0:  mem 0x1c20000-0x1c203ff on simplebus0
a10_timer0:  mem 0x1c20c00-0x1c20c8f irq 54 on simplebus0
Event timer "a10_timer Eventtimer" frequency 24000000 Hz quality 1000
Timecounter "a10_timer timer0" frequency 24000000 Hz quality 1000
a10wd0:  mem 0x1c20c90-0x1c20c9f on simplebus0
gpio0:  mem 0x1c20800-0x1c20bff irq 60 on simplebus0
gpioc0:  on gpio0
gpiobus0:  on gpio0
ehci0:  mem 0x1c14000-0x1c14fff irq 71 on simplebus0
usbus0: EHCI version 1.0
usbus0 on ehci0
ehci1:  mem 0x1c1c000-0x1c1cfff irq 72 on simplebus0
usbus1: EHCI version 1.0
usbus1 on ehci1
uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0
uart0: console (115200,n,8,1)
emac0:  mem 0x1c0b000-0x1c0bfff irq 87 on simplebus0
miibus0:  on emac0
rgephy0:  PHY 0 on miibus0

vm_fault(0xc08bab80, 0, 1, 0) -> 1
Fatal kernel mode data abort: 'Translation Fault (S)'
trapframe: 0xc08e5a48
FSR=3D00000005, FAR=3D00000000, spsr=3Da00001d3
r0 =3D00000000, r1 =3Dc0547c85, r2 =3D00000072, r3 =3D00000008
r4 =3Dc3b49f00, r5 =3Dc3b4a080, r6 =3Dc3b4a0b8, r7 =3D00000000
r8 =3Dc056b038, r9 =3Dc3ae1700, r10=3Dc05d4930, r11=3Dc08e5ab0
r12=3D00000000, ssp=3Dc08e5a98, slr=3Dc024e0f0, pc =3Dc03d7604

[ thread pid 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]



> Message du 20/09/14 15:11
> De : "Gilles DALMAS"=20
> A : freebsd-arm@freebsd.org
> Copie =C3=A0 :=20
> Objet : kernel debugger on cubietruck
>=20
> hi, =C2=A0 I would compile freebsd for it run on a cubietruck. For this I=
 used the wiki page: https://wiki.freebsd.org/FreeBSD/arm/Cubieboard using =
option confifuration "CUBIEBOARD2." everything goes well, but starting on t=
he "truck", I get this message: =C2=A0 vm_fault(0xc08bab80, 0, 1, 0) -> 1 F=
atal kernel mode data abort: 'Translation Fault (S)' trapframe: 0xc08e5a48 =
FSR=3D00000005, FAR=3D00000000, spsr=3Da00001d3 r0 =3D00000000, r1 =3Dc0547=
c85, r2 =3D00000072, r3 =3D00000008 r4 =3Dc3b49f00, r5 =3Dc3b4a080, r6 =3Dc=
3b4a0b8, r7 =3D00000000 r8 =3Dc056b038, r9 =3Dc3ae1700, r10=3Dc05d4930, r11=
=3Dc08e5ab0 r12=3D00000000, ssp=3Dc08e5a98, slr=3Dc024e0f0, pc =3Dc03d7604 =
[ thread pid 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] where is the =
problem please ? _______________________________________________ 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 13:32:53 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 6A704622
 for <freebsd-arm@freebsd.org>; Sat, 20 Sep 2014 13:32:53 +0000 (UTC)
Received: from smtp.smtpout.orange.fr (smtp05.smtpout.orange.fr
 [80.12.242.127]) by mx1.freebsd.org (Postfix) with ESMTP id A221DBA4
 for <freebsd-arm@freebsd.org>; Sat, 20 Sep 2014 13:32:51 +0000 (UTC)
Received: from wwinf1p20 ([10.223.75.44]) by mwinf5d28 with ME
 id tRRD1o0070xLc3N03RRDK6; Sat, 20 Sep 2014 15:25:13 +0200
X-ME-Helo: wwinf1p20
X-ME-Auth: Z2RhbG1hc0B3YW5hZG9vLmZy
X-ME-Date: Sat, 20 Sep 2014 15:25:13 +0200
X-ME-IP: 109.212.165.91
Date: Sat, 20 Sep 2014 15:25:13 +0200 (CEST)
From: Gilles DALMAS <gdalmas@wanadoo.fr>
Reply-To: Gilles DALMAS <gdalmas@wanadoo.fr>
To: Boris Astardzhiev <boris.astardzhiev@gmail.com>
Message-ID: <1886035707.11136.1411219513483.JavaMail.www@wwinf1p20>
In-Reply-To: <CAP=KkTwhRpJRW8jTLCjYRf55RLc-xSi+FCEBd5WHpU0hn-bUmQ@mail.gmail.com>
References: <568188637.10901.1411218668061.JavaMail.www@wwinf1p20>
 <CAP=KkTwhRpJRW8jTLCjYRf55RLc-xSi+FCEBd5WHpU0hn-bUmQ@mail.gmail.com>
Subject: Re: kernel debugger on cubietruck
MIME-Version: 1.0
X-Originating-IP: [109.212.165.91]
X-WUM-FROM: |~|
X-WUM-TO: |~|
X-WUM-CC: |~|
X-WUM-REPLYTO: |~|
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1
Cc: freebsd-arm@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 13:32:53 -0000

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_self() at db_trace_self
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 pc =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 0xc08e5768
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r10 =3D 0xc08ba1c4
db_hex2dec() 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 0x00000000=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 0xc08ba1bc
=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_trap+0x15c)
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sp =3D 0xc08e5958=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 0xc08e5998
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r4 =3D 0xc08e5a48=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_handler() 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 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 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 0xc08e5ab0
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 r0 =3D 0x00000000=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 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 r12 =3D 0x000=
00000
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 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 0xc08e5ab0
Unwind failure (no registers changed)



=C2=A0

> Message du 20/09/14 15:13
> De : "Boris Astardzhiev"=20
> A : "Gilles DALMAS"=20
> Copie =C3=A0 : freebsd-arm@freebsd.org
> Objet : Re: kernel debugger on cubietruck
>=20
>
> Hi,

> As far as I see strcmp() is passed a NULL pointer, try issuing a backtrac=
e to get the exact place of calling.

> Regards

On Sep 20, 2014 4:11 PM, "Gilles DALMAS"  wrote:

hi,
>=20
> =C2=A0
>=20
> I would compile freebsd for it run on a cubietruck. For this I used the w=
iki page: https://wiki.freebsd.org/FreeBSD/arm/Cubieboard using option conf=
ifuration "CUBIEBOARD2." everything goes well, but starting on the "truck",=
 I get this message:
>=20
> =C2=A0
>=20
> vm_fault(0xc08bab80, 0, 1, 0) -> 1
> Fatal kernel mode data abort: 'Translation Fault (S)'
> trapframe: 0xc08e5a48
> FSR=3D00000005, FAR=3D00000000, spsr=3Da00001d3
> r0 =3D00000000, r1 =3Dc0547c85, r2 =3D00000072, r3 =3D00000008
> r4 =3Dc3b49f00, r5 =3Dc3b4a080, r6 =3Dc3b4a0b8, r7 =3D00000000
> r8 =3Dc056b038, r9 =3Dc3ae1700, r10=3Dc05d4930, r11=3Dc08e5ab0
> r12=3D00000000, ssp=3Dc08e5a98, slr=3Dc024e0f0, pc =3Dc03d7604
>=20
> [ thread pid 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]
>=20
>=20
>=20
> where is the problem please ?
>=20
> _______________________________________________
> freebsd-arm@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"




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