From owner-freebsd-arm@FreeBSD.ORG Thu May 2 15:22:01 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8D1B8B01 for ; Thu, 2 May 2013 15:22:01 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id 644FA1319 for ; Thu, 2 May 2013 15:22:01 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UXvKU-000LxA-Lx; Thu, 02 May 2013 15:21:54 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r42FLql6009978; Thu, 2 May 2013 09:21:52 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX19r9RwTlrqrSYqR04vdgqtD Subject: Re: vm fault on OpenRD [was: Re: Allwinner A13: Fatal kernel mode data abort: 'Translation Fault (S)'] From: Ian Lepore To: Abdoulaye Walsimou Gaye In-Reply-To: <5181AC1A.2020400@embtoolkit.org> References: <63837.85.229.93.125.1367417396.squirrel@alvermark.net> <5181AC1A.2020400@embtoolkit.org> Content-Type: multipart/mixed; boundary="=-ebWqrFW/G1F17ZAePZ+W" Date: Thu, 02 May 2013 09:21:51 -0600 Message-ID: <1367508111.1180.112.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: freebsd-arm@FreeBSD.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 May 2013 15:22:01 -0000 --=-ebWqrFW/G1F17ZAePZ+W Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Thu, 2013-05-02 at 01:58 +0200, Abdoulaye Walsimou Gaye wrote: > On 05/01/2013 04:09 PM, Jakob Alvermark wrote: > > [...] > > > > Hello, > I have similar boot error while trying to boot my openrd-base, with a KERNCONF based on DB-88F6XXX (see attached files) > > ## Starting application at 0x00900000 ... > dtbp = 0xc0c9a8f8 > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2013 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 9.1-STABLE #1 r+aed5102-dirty: Thu May 2 01:50:19 CEST 2013 > walsimou@vbox-fbsd64:/home/walsimou/embtk-fbsd/obj/arm.arm/usr/home/walsimou/freebsd.git/sys/OPENRD-BASE arm > gcc version 4.2.1 20070831 patched [FreeBSD] > WARNING: DIAGNOSTIC option enabled, expect reduced performance. > module mvs already present! > CPU: Feroceon 88FR131 rev 1 (Marvell core) > DC enabled IC enabled WB enabled EABT branch prediction enabled > 16KB/32B 4-way Instruction cache > 16KB/32B 4-way write-back-locking-C Data cache > real memory = 536870912 (512 MB) > avail memory = 519278592 (495 MB) > SOC: Marvell 88F6281 rev A0, TClock 200MHz > simplebus0: on fdtbus0 > ic0: mem 0xf1020200-0xf102023b on simplebus0 > timer0: mem 0xf1020300-0xf102032f irq 1 on simplebus0 > Event timer "CPUTimer0" frequency 200000000 Hz quality 1000 > Timecounter "CPUTimer1" frequency 200000000 Hz quality 1000 > gpio0: mem 0xf1010100-0xf101011f irq 35,36,37,38,39,40,41 on simplebus0 > rtc0: mem 0xf1010300-0xf1010307 on simplebus0 > twsi0: mem 0xf1011000-0xf101101f irq 43 on simplebus0 > iicbus0: on twsi0 > iic0: on iicbus0 > mge0: mem 0xf1072000-0xf1073fff irq 12,13,14,11,46 on simplebus0 > mge0: Ethernet address: 00:50:43:01:a1:32 > miibus0: on mge0 > e1000phy0: PHY 8 on miibus0 > e1000phy0: none, 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto > uart0: <16550 or compatible> mem 0xf1012000-0xf101201f irq 33 on simplebus0 > uart0: console (114678,n,8,1) > uart1: <16550 or compatible> mem 0xf1012100-0xf101211f irq 34 on simplebus0 > cesa0: mem 0xf1030000-0xf103ffff irq 22 on simplebus0 > ehci0: mem 0xf1050000-0xf1050fff irq 48,19 on simplebus0 > usbus0: EHCI version 1.0 > usbus0: stop timeout > usbus0: set host controller mode > > vm_fault(0xc0cc6674, 0, 1, 0) -> 1 > Fatal kernel mode data abort: 'Translation Fault (S)' > trapframe: 0xc0cfab68 > FSR=00000005, FAR=00000010, spsr=200000d3 > r0 =c36605c0, r1 =c0cc6390, r2 =600000d3, r3 =00000000 > r4 =c0a4e65c, r5 =80000003, r6 =c36640d0, r7 =c0c12278 > r8 =ffffffff, r9 =c350f280, r10=c3664080, r11=c0cfabf0 > r12=c0cc8aa0, ssp=c0cfabb4, slr=c0c26698, pc =c0a50964 > > [ thread pid 0 tid 100000 ] > Stopped at While the error messages are similar, it appears that the cause is completely different. Given that it appears to have crashed while initializing USB, I can think of two things to try... Add USB_HOST_ALIGN=32 to your kernel config file. This is required for all armv4 and armv5 platforms, but isn't in most of our stock config files right now. Also, try the attached patch. It avoids unconditionally enabling the cache "allocate on write" feature in the hardware, and instead leaves it in whatever state the bootloader set it to (on the assumption that the vendor-supplied bootloader knows best about when this feature is problematic; I think it may depend somewhat on how the board is designed). -- Ian --=-ebWqrFW/G1F17ZAePZ+W Content-Disposition: inline; filename="marvell_no_wralloc.diff" Content-Type: text/x-patch; name="marvell_no_wralloc.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/arm/arm/cpufunc.c =================================================================== --- sys/arm/arm/cpufunc.c (revision 243412) +++ sys/arm/arm/cpufunc.c (working copy) @@ -1067,13 +1067,13 @@ set_cpufuncs() */ if (cputype == CPU_ID_MV88FR571_VD || cputype == CPU_ID_MV88FR571_41) { - sheeva_control_ext(0xffffffff, - FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | + sheeva_control_ext(0xffffffff & ~FC_WR_ALLOC_EN, + FC_DCACHE_STREAM_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN | FC_L2_PREF_DIS); } else { - sheeva_control_ext(0xffffffff, - FC_DCACHE_STREAM_EN | FC_WR_ALLOC_EN | + sheeva_control_ext(0xffffffff & ~FC_WR_ALLOC_EN, + FC_DCACHE_STREAM_EN | FC_BRANCH_TARG_BUF_DIS | FC_L2CACHE_EN); } --=-ebWqrFW/G1F17ZAePZ+W--