From owner-freebsd-arm@FreeBSD.ORG Sun Jan 6 07:35:54 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 5C7B7B42 for ; Sun, 6 Jan 2013 07:35:54 +0000 (UTC) (envelope-from wynkoop@wynn.com) Received: from mail.wynn.com (wa3yre.wynn.com [199.89.147.3]) by mx1.freebsd.org (Postfix) with ESMTP id 04B0D6D6 for ; Sun, 6 Jan 2013 07:35:53 +0000 (UTC) Received: from ivory.wynn.com (mail.wynn.com [199.89.147.3]) (authenticated bits=0) by mail.wynn.com (8.14.3/8.12.6) with ESMTP id r067Zcv5061318; Sun, 6 Jan 2013 02:35:39 -0500 (EST) (envelope-from wynkoop@wynn.com) Date: Sun, 6 Jan 2013 02:35:38 -0500 From: Brett Wynkoop To: Ian Lepore Subject: Re: BeagleBone System Hang Message-ID: <20130106023538.2035b8c4@ivory.wynn.com> In-Reply-To: <1357329320.1088.20.camel@revolution.hippie.lan> References: <20130104053011.095e9fad@ivory.wynn.com> <1357328747.1088.18.camel@revolution.hippie.lan> <1357329320.1088.20.camel@revolution.hippie.lan> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-arm 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: Sun, 06 Jan 2013 07:35:54 -0000 On Fri, 04 Jan 2013 12:55:20 -0700 Ian Lepore wrote: > On Fri, 2013-01-04 at 12:45 -0700, Ian Lepore wrote: > > On Fri, 2013-01-04 at 05:30 -0500, Brett Wynkoop wrote: > > > Greeting- > > > > > > Ok tonight before trying to install the world I just built I > > > decided to back up my 8G microsd to my laptop. > > > > > > On the Bone I ran: > > > > > > dd if=/dev/mmcsd0 | gzip -c | nc laptop 12345 > > > > > > With of course the correct receiving nc and dd on the other side. > > > > > > The result was: > > > > > > > > > aintc0: Spurious interrupt detected (0xffffffff) > > [...] > > > aintc0: Spurious interrupt detected (0xffffffff) > > > > > > and the loss of network connectivity as well as the inability to > > > terminate the process with ctl-C and the inability to background > > > it with ctl-Z. > > > > > > I have no idea what aintc is, but what ever it is I bet we need > > > to do some driver work related to it. > > > > > > -Brett > > > > After a few minutes of glancing at the complex and confusing > > datasheet for that interrupt controller, I'm not sure what's > > causing the spurious interrupt, but the code that's detecting and > > reporting the problem isn't clearing the status, so it just gets > > into a tight reporting loop. > > > > Try the attached patch to see if it makes the loop stop and the > > system become responsive again. This is more of a workaround than > > a real fix. > > > > -- Ian > > > > differences between files attachment (aintc_spurious.diff) > > diff -r 28b12492cd58 sys/arm/ti/aintc.c > > --- a/sys/arm/ti/aintc.c Fri Dec 21 11:20:58 2012 -0700 > > +++ b/sys/arm/ti/aintc.c Fri Jan 04 12:42:34 2013 -0700 > > @@ -157,6 +157,7 @@ arm_get_next_irq(int last_irq) > > if ((active_irq & 0xffffff80)) { > > device_printf(ti_aintc_sc->sc_dev, > > "Spurious interrupt detected (0x%08x)\n", > > active_irq); > > + aintc_write_4(INTC_SIR_IRQ, (active_irq & > > 0xffffff80)); return -1; > > } > > > > Hrm, now I'm not so sure I've interpretted the datasheet correctly. > If that doesn't work, try this line: > > aintc_write_4(INTC_SIR_IRQ, 0); > > And if that doesn't work, then... well... my BeagleBone will arrive > in a few days and I'll try other things. :) > > -- Ian Ian- When I added the second patch to the first and rebuilt the kernel I was able to send a dd of my disk over the net to my laptop! Yeah! You rock! I wish I understood this kernel magic you do! Even if it is not the best way to do things I think you should commit this to head as it is better than what is there now! -Brett -- wynkoop@wynn.com http://prd4.wynn.com/wynkoop/pgp-keys.txt 917-642-6924 718-717-5435 From owner-freebsd-arm@FreeBSD.ORG Sun Jan 6 19:55:54 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 6148C490 for ; Sun, 6 Jan 2013 19:55:54 +0000 (UTC) (envelope-from wynkoop@wynn.com) Received: from mail.wynn.com (wa3yre.wynn.com [199.89.147.3]) by mx1.freebsd.org (Postfix) with ESMTP id EB87415CF for ; Sun, 6 Jan 2013 19:55:52 +0000 (UTC) Received: from ivory.wynn.com (mail.wynn.com [199.89.147.3]) (authenticated bits=0) by mail.wynn.com (8.14.3/8.12.6) with ESMTP id r06Jto02072405 for ; Sun, 6 Jan 2013 14:55:50 -0500 (EST) (envelope-from wynkoop@wynn.com) Date: Sun, 6 Jan 2013 14:55:50 -0500 From: Brett Wynkoop To: freebsd-arm Subject: networking with qemu-arm Message-ID: <20130106145550.4656bbe5@ivory.wynn.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Sun, 06 Jan 2013 19:55:54 -0000 Greeting- Thanks to gonzo- I am able to boot my BeagleBone image in qemu-arm, but it never goes multiuser. It hangs just before the login prompt after displaying the date. I also find that there is no network interface even though I start with the -net user flag. Does anyone have the magic needed to get qemu-arm to provide a network interface. It would be very handy to be able to play with things in a VM as well as on the beaglebone. Thanks! -Brett -- wynkoop@wynn.com http://prd4.wynn.com/wynkoop/pgp-keys.txt 917-642-6924 718-717-5435 From owner-freebsd-arm@FreeBSD.ORG Sun Jan 6 20:42:01 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A9B2B544 for ; Sun, 6 Jan 2013 20:42:01 +0000 (UTC) (envelope-from ronald-freebsd8@klop.yi.org) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.78]) by mx1.freebsd.org (Postfix) with ESMTP id 5E246177D for ; Sun, 6 Jan 2013 20:42:01 +0000 (UTC) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Trx2W-00068R-GA for freebsd-arm@freebsd.org; Sun, 06 Jan 2013 21:41:53 +0100 Received: from h253044.upc-h.chello.nl ([62.194.253.44] helo=pinky) by smtp.greenhost.nl with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1Trx2W-0007It-KP for freebsd-arm@freebsd.org; Sun, 06 Jan 2013 21:41:52 +0100 Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes To: freebsd-arm@freebsd.org Subject: Re: networking with qemu-arm References: <20130106145550.4656bbe5@ivory.wynn.com> Date: Sun, 06 Jan 2013 21:41:51 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: "Ronald Klop" Message-ID: In-Reply-To: <20130106145550.4656bbe5@ivory.wynn.com> User-Agent: Opera Mail/12.12 (Win32) X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: 0.8 X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.1 X-Scan-Signature: b011d5308189b8f364b008c39e0eea9f 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: Sun, 06 Jan 2013 20:42:01 -0000 On Sun, 06 Jan 2013 20:55:50 +0100, Brett Wynkoop wrote: > Greeting- > > Thanks to gonzo- I am able to boot my BeagleBone image in qemu-arm, but > it never goes multiuser. It hangs just before the login prompt after > displaying the date. > > I also find that there is no network interface even though I start with > the -net user flag. Does anyone have the magic needed to get qemu-arm > to provide a network interface. It would be very handy to be able to > play with things in a VM as well as on the beaglebone. > > Thanks! > > -Brett > The login prompt is displayed by the program 'getty'. The file /etc/ttys contains information about where it does this, e.g. on serial ports (ttyu*) or virtual terminals (ttyv*). Your qemu probably has some virtual serial port you can connect to from the host OS. Or you should enable getty on the console or virtual terminal. NB: my amd64 machine has another default /etc/ttys than my arm machine. Ronald. From owner-freebsd-arm@FreeBSD.ORG Sun Jan 6 23:02:03 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5398F7AA for ; Sun, 6 Jan 2013 23:02:03 +0000 (UTC) (envelope-from wynkoop@wynn.com) Received: from mail.wynn.com (wa3yre.wynn.com [199.89.147.3]) by mx1.freebsd.org (Postfix) with ESMTP id 0EF401C2A for ; Sun, 6 Jan 2013 23:02:01 +0000 (UTC) Received: from ivory.wynn.com (mail.wynn.com [199.89.147.3]) (authenticated bits=0) by mail.wynn.com (8.14.3/8.12.6) with ESMTP id r06N1xRF075354; Sun, 6 Jan 2013 18:01:59 -0500 (EST) (envelope-from wynkoop@wynn.com) Date: Sun, 6 Jan 2013 18:01:59 -0500 From: Brett Wynkoop To: "Ronald Klop" Subject: Re: networking with qemu-arm Message-ID: <20130106180159.58b726a8@ivory.wynn.com> In-Reply-To: References: <20130106145550.4656bbe5@ivory.wynn.com> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.13; x86_64-apple-darwin10.8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Sun, 06 Jan 2013 23:02:03 -0000 On Sun, 06 Jan 2013 21:41:51 +0100 "Ronald Klop" wrote: > > The login prompt is displayed by the program 'getty'. The > file /etc/ttys contains information about where it does this, e.g. on > serial ports (ttyu*) or virtual terminals (ttyv*). > Your qemu probably has some virtual serial port you can connect to > from the host OS. Or you should enable getty on the console or > virtual terminal. NB: my amd64 machine has another default /etc/ttys > than my arm machine. > > Ronald. Greeting- Since I got a getty on the console of the BeagleBone I did not even look at /etc/ttys, but now that I have looked at it I see the Bone image has the getty set on /dev/ttyu0 and nothing on /dev/console. I am pretty sure now that is what the problem was. Thanks for pointing me to /etc/ttys. I did not think of looking at it. Unfortunantly in my quest to get networking going I seem to have killed disk access in qemu. Not having good qemu luck. -Brett -- wynkoop@wynn.com http://prd4.wynn.com/wynkoop/pgp-keys.txt 917-642-6924 718-717-5435 From owner-freebsd-arm@FreeBSD.ORG Mon Jan 7 11:06:42 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE356FEC for ; Mon, 7 Jan 2013 11:06:42 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id D0651F83 for ; Mon, 7 Jan 2013 11:06:42 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.6/8.14.6) with ESMTP id r07B6gXX087803 for ; Mon, 7 Jan 2013 11:06:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.6/8.14.6/Submit) id r07B6g6l087801 for freebsd-arm@FreeBSD.org; Mon, 7 Jan 2013 11:06:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 7 Jan 2013 11:06:42 GMT Message-Id: <201301071106.r07B6g6l087801@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-arm@FreeBSD.org Subject: Current problem reports assigned to 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: Mon, 07 Jan 2013 11:06:42 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o arm/174461 arm [patch] Fix off-by-one in arm9/arm10 cache maintenance o arm/173617 arm Dreamplug exhibits eSATA file corruption using network o kern/171096 arm [arm][xscale][ixp]Allow 16bit access on PCI bus o arm/166256 arm build fail in pmap.c o arm/162159 arm [panic] USB errors leading to panic on DockStar 9.0-RC o arm/161110 arm /usr/src/sys/arm/include/signal.h is bad o arm/161044 arm devel/icu does not build on arm o arm/158950 arm arm/sheevaplug fails fsx when mmap operations are enab o arm/155894 arm [patch] Enable at91 booting from SDHC (high capacity) p arm/155214 arm [patch] MMC/SD IO slow on Atmel ARM with modern large o arm/154227 arm [geli] using GELI leads to panic on ARM o arm/153380 arm Panic / translation fault with wlan on ARM o arm/150581 arm [irq] Unknown error generates IRQ address decoding err o arm/149288 arm mail/dovecot causes panic during configure on Sheevapl o arm/134368 arm [patch] nslu2_led driver for the LEDs on the NSLU2 p arm/134338 arm [patch] Lock GPIO accesses on ixp425 16 problems total. From owner-freebsd-arm@FreeBSD.ORG Tue Jan 8 12:59:33 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 04EC35B1 for ; Tue, 8 Jan 2013 12:59:33 +0000 (UTC) (envelope-from alie@affle.com) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by mx1.freebsd.org (Postfix) with ESMTP id CBA81F23 for ; Tue, 8 Jan 2013 12:59:32 +0000 (UTC) Received: by mail-pb0-f41.google.com with SMTP id xa7so233437pbc.28 for ; Tue, 08 Jan 2013 04:59:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=ezsFaO16E1/OJX7UxRBXNPx/hUXnQ1uahZrLWe8+DQs=; b=Vw9tRU98MKccU/q8fDT7aRZiFoJC/bC12MgbC2TY3DIYWy5kRVaCLWm4LTRK3nm+fU bop0uylfaA99wmSZxD7kFSFyVob0ubn/djfaB5J1A7rJU0t4ph1L7l604CacbH3rIPgl Cfwtb3zkh57n3inoUm3TojV6W9J2PEqI46Tndnnb+5Ld68t/a4FhMlv6WH0QgSdV+fN1 5SdoZI+B7e52JcmxVl87LVhKzY80M+cCoA9fUOzr97wEFd8nHTr6YBdOdPId8MfDvVLM 0QMWMz7ybYqmKjxuA1CzXKw5FKhDZZEv6gNZzevq8Yn7IVCO0r1ivW+kaOw1tajrEXQM dTLA== X-Received: by 10.68.245.167 with SMTP id xp7mr201510231pbc.75.1357649971913; Tue, 08 Jan 2013 04:59:31 -0800 (PST) Received: from [49.245.205.85] ([49.245.205.85]) by mx.google.com with ESMTPS id t5sm40725954paw.20.2013.01.08.04.59.24 (version=SSLv3 cipher=OTHER); Tue, 08 Jan 2013 04:59:31 -0800 (PST) Message-ID: <50EC17FF.1010304@affle.com> Date: Tue, 08 Jan 2013 20:58:39 +0800 From: Alie Tan User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: CFT: Overhauled CPSW driver for BeagleBone References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQmNwa3dfIZ3d+qvTnWhFUz8ph/so+wHDpZGYBCsk8D+jM7a0LFLxtxsm96JOo+XZ/KgMa6d 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: Tue, 08 Jan 2013 12:59:33 -0000 NetBSD already ported cpsw driver from FreeBSD http://freshbsd.org/search?project=netbsd&q=cpsw Not sure if they have some modification to improve the driver From owner-freebsd-arm@FreeBSD.ORG Tue Jan 8 17:11:17 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 956E44C9 for ; Tue, 8 Jan 2013 17:11:17 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id 304FCDED for ; Tue, 8 Jan 2013 17:11:17 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id A857339E09 for ; Wed, 9 Jan 2013 02:11:09 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 9433D39D62 for ; Wed, 9 Jan 2013 02:11:09 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> In-Reply-To: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Wed, 9 Jan 2013 02:11:12 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Tue, 08 Jan 2013 17:11:17 -0000 I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. Now default transfer mode is DMA. If you want to use PIO(previous method), you can change it by following command anytime: # sysctl hw.bcm2835.sdhci.pio=1 or add to /boot/loader.rc: set hw.bcm2835.sdhci.pio=1 major change: o fix critical bug caused panic in arm/arm/vfp.c o fix VFP compatibility for existing world/apps using SIGILL o add TMPFS and UNIONFS kernel config o use tmpfs as /tmp o merge pmap-wb-caches-fix.diff and arm-autotune-fix.diff by gonzo o assign all DMA(DMA0-12) IRQs in bcm2835-rpi-b.dts o increase DI_MAX_INTR_NUM to 16 (necessary for DMA IRQs) o call rman_set_virtual if SYS_RES_MEMORY o add transfer and transfer_end method to dev/sdhci o add simple DMA controller (does not support linked operation) o test implement DMA transfer for SD card I/O o add hw.bcm2835.sdhci.pio for PIO transfer (disabled by default) Note: 512 byte chunk is used for each DMA transfer of SD because eMMC have only 1KB FIFO. PIO mode is always used for a request smaller than 512 byte. DMA transfer is not so fast although the efficiency of the bus differs. At this time, first trigger is invoked by same INT of PIO. sys/dev/sdhci/sdhci.c should be rewritten to adapt the DMA controller. Known Problems: To store correct values to DMA engine, it uses D-cache invalidate all. (unknown reason, first chunk only) Some code using VFP hang. You can get the pre-build image from my archives: http://www.peach.ne.jp/archives/rpi/ Using config is here: http://www.peach.ne.jp/archives/rpi/config/RPI-B-test13 New kernel only is here: http://www.peach.ne.jp/archives/rpi/kernel/ Source and pacth is here: http://www.peach.ne.jp/archives/rpi/patch/ For more info, please read old ML or Japanese blog: http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004541.html http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004507.html http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004421.html http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004331.html http://shell.peach.ne.jp/aoyama/ Enjoy clang world in Raspberry Pi! Thank you. -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Tue Jan 8 18:29:56 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 042466C for ; Tue, 8 Jan 2013 18:29:56 +0000 (UTC) (envelope-from markm@FreeBSD.org) Received: from gromit.grondar.org (grandfather.grondar.org [IPv6:2a01:348:0:15:5d59:5c20:0:2]) by mx1.freebsd.org (Postfix) with ESMTP id C6B4325E for ; Tue, 8 Jan 2013 18:29:55 +0000 (UTC) Received: from uucp by gromit.grondar.org with local-rmail (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1Tsdvt-0008Je-Ib for freebsd-arm@freebsd.org; Tue, 08 Jan 2013 18:29:53 +0000 Received: from localhost ([127.0.0.1] helo=groundzero.grondar.org) by groundzero.grondar.org with esmtp (Exim 4.77 (FreeBSD)) (envelope-from ) id 1TsdrP-000CF1-69; Tue, 08 Jan 2013 18:25:15 +0000 To: "Daisuke Aoyama" Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) In-reply-to: References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> From: Mark Murray Date: Tue, 08 Jan 2013 18:25:14 +0000 Message-Id: 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: Tue, 08 Jan 2013 18:29:56 -0000 "Daisuke Aoyama" writes: > I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. Excellent, thank you! How do you build your images, please? I'm using Ti Kientzle's scripts, and they don't produce the same runnable images that you have prodiced. Thanks! M -- Mark R V Murray Cert APS(Open) Dip Phys(Open) BSc Open(Open) BSc(Hons)(Open) Pi: 132511160 From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 01:25:46 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D23D58B for ; Wed, 9 Jan 2013 01:25:46 +0000 (UTC) (envelope-from george+freebsd@m5p.com) Received: from mailhost.m5p.com (ip-2-1-0-2.r03.asbnva02.us.ce.gin.ntt.net [IPv6:2001:418:0:5000::16]) by mx1.freebsd.org (Postfix) with ESMTP id 3DF5F946 for ; Wed, 9 Jan 2013 01:25:45 +0000 (UTC) Received: from wonderland.m5p.com (localhost [IPv6:::1]) by mailhost.m5p.com (8.14.5/8.14.5) with ESMTP id r091PdEQ050279 for ; Tue, 8 Jan 2013 20:25:44 -0500 (EST) (envelope-from george+freebsd@m5p.com) Message-ID: <50ECC713.6000507@m5p.com> Date: Tue, 08 Jan 2013 20:25:39 -0500 From: George Mitchell User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20121125 Thunderbird/15.0.1 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 10.100.0.3 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mailhost.m5p.com [IPv6:::1]); Tue, 08 Jan 2013 20:25:45 -0500 (EST) 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: Wed, 09 Jan 2013 01:25:46 -0000 On 01/08/13 12:11, Daisuke Aoyama wrote: > I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. > > Now default transfer mode is DMA. If you want to use PIO(previous method), > you can change it by following command anytime: > > # sysctl hw.bcm2835.sdhci.pio=1 > > or add to /boot/loader.rc: > > set hw.bcm2835.sdhci.pio=1 > > major change: > o fix critical bug caused panic in arm/arm/vfp.c > o fix VFP compatibility for existing world/apps using SIGILL > o add TMPFS and UNIONFS kernel config > o use tmpfs as /tmp > o merge pmap-wb-caches-fix.diff and arm-autotune-fix.diff by gonzo > o assign all DMA(DMA0-12) IRQs in bcm2835-rpi-b.dts > o increase DI_MAX_INTR_NUM to 16 (necessary for DMA IRQs) > o call rman_set_virtual if SYS_RES_MEMORY > o add transfer and transfer_end method to dev/sdhci > o add simple DMA controller (does not support linked operation) > o test implement DMA transfer for SD card I/O > o add hw.bcm2835.sdhci.pio for PIO transfer (disabled by default) > > Note: > 512 byte chunk is used for each DMA transfer of SD because eMMC have > only 1KB FIFO. > PIO mode is always used for a request smaller than 512 byte. > DMA transfer is not so fast although the efficiency of the bus differs. > At this time, first trigger is invoked by same INT of PIO. > sys/dev/sdhci/sdhci.c should be rewritten to adapt the DMA controller. > > Known Problems: > To store correct values to DMA engine, it uses D-cache invalidate all. > (unknown reason, first chunk only) > Some code using VFP hang. > > You can get the pre-build image from my archives: > > http://www.peach.ne.jp/archives/rpi/ > > Using config is here: > http://www.peach.ne.jp/archives/rpi/config/RPI-B-test13 > > New kernel only is here: > http://www.peach.ne.jp/archives/rpi/kernel/ > > Source and pacth is here: > http://www.peach.ne.jp/archives/rpi/patch/ > > > For more info, please read old ML or Japanese blog: > http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004541.html > http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004507.html > http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004421.html > http://lists.freebsd.org/pipermail/freebsd-arm/2012-December/004331.html > http://shell.peach.ne.jp/aoyama/ > > > Enjoy clang world in Raspberry Pi! > Thank you. Wonderful! Best of all, the console has a cursor! It's sitting there building sysutils/LPRng on an NFS-mounted /usr/ports tree (though it doesn't appear it will finish before the morning). No crash so far! Thank you very much! -- George Mitchell From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 11:47:11 2013 Return-Path: Delivered-To: freebsd-arm@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B1C39700; Wed, 9 Jan 2013 11:47:11 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id 6F86880F; Wed, 9 Jan 2013 11:47:10 +0000 (UTC) Received: from [192.168.0.2] (cpc10-cmbg15-2-0-cust123.5-4.cable.virginmedia.com [86.30.246.124]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r09BkxIj092907 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 9 Jan 2013 11:47:00 GMT (envelope-from theraven@FreeBSD.org) Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=iso-8859-1 From: David Chisnall In-Reply-To: Date: Wed, 9 Jan 2013 11:46:56 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <0C01FA61-5BC9-4FA2-B3F2-E843E2B29B54@FreeBSD.org> References: <2BA73CBF02B04DD19D08CDFC556B8750@ad.peach.ne.jp> <1356624694.1144.67.camel@revolution.hippie.lan> <234E1E18AC1C4A3985D6C570F78698E6@ad.peach.ne.jp> <9ED42265200A41B1BD637682720E0E9D@ad.peach.ne.jp> To: Adrian Chadd X-Mailer: Apple Mail (2.1278) 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: Wed, 09 Jan 2013 11:47:11 -0000 On 28 Dec 2012, at 16:47, Adrian Chadd wrote: > david - what's the "right" behaviour here? Surely clang should be > inserting 4 bytes of padding before that pointer? The problem appears to be that clang is folding two 32-bit stores into a = 64-bit store, which is a perfectly safe thing to do half of the time = (i.e. when the alignment of the first one is 64 bits), but not the other = half. I've asked ARM's LLVM/Clang team to look at it, and they say that = they can probably do so soon if there's a bug filed in LLVM's bugzilla = with a reduced test case. David= From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 20:56:18 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 378B826B for ; Wed, 9 Jan 2013 20:56:18 +0000 (UTC) (envelope-from roel@bouwman.net) Received: from smtp01.qsp.nl (smtp01.qsp.nl [193.254.214.162]) by mx1.freebsd.org (Postfix) with ESMTP id ED01BD54 for ; Wed, 9 Jan 2013 20:56:17 +0000 (UTC) Received: from smtp01.qsp.nl (localhost [127.0.0.1]) by smtp01.qsp.nl (Postfix) with ESMTP id 670472A0C81 for ; Wed, 9 Jan 2013 21:50:37 +0100 (CET) Received: from nwg.bouwman.net (berl.bouwman.net [80.101.149.113]) by smtp01.qsp.nl (Postfix) with ESMTP for ; Wed, 9 Jan 2013 21:50:37 +0100 (CET) Received: by nwg.bouwman.net (Postfix, from userid 501) id CA9024516F; Wed, 9 Jan 2013 21:50:29 +0100 (CET) Date: Wed, 9 Jan 2013 21:50:29 +0100 From: Roel Bouwman To: freebsd-arm@freebsd.org Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Message-ID: <20130109205029.GB3090@shuttle.bouwman.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i 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: Wed, 09 Jan 2013 20:56:18 -0000 Hi Daisuke, > I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. > Now default transfer mode is DMA. If you want to use PIO(previous method), > you can change it by following command anytime: I have been playing with the image for a few hours now, and have already reflashed it three times. After a crash, the fsck at boot fails and causes a panic: Relevant info: sdhci_bcm0: mem 0xf2300000-0xf23000ff irq 70 on simplebus0 bcm_sdhci_attach(): SDHCI frequency: 100MHz mmc0: on sdhci_bcm0 ... mmcsd0: 7695MB at mmc0 25.0MHz/4bit/65535-block .. Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... WARNING: / was not properly dismounted WARNING: /: mount pending error: blocks 0 files 4 warning: no time-of-day clock registered, system time will not be set accurately Setting hostuuid: 12ffa981-59a2-11e2-8bd9-b827eb5f3b9e. Setting hostid: 0x76c702b3. Entropy harvesting: interrupts ethernet point_to_point kickstart. Starting file system checks: ** SU+J Recovering /dev/mmcsd0s2a ** Reading 8388608 byte journal from inode 4. ** Buildingp id 65 (fsck_ufs), uid 0: exited on signal 11 recovery table. panic: Bad link elm 0xc10fcb0c next->prev != elm KDB: enter: panic [ thread pid 65 tid 100049 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> This is reprocedable each and every time the system shuts down without unmounting the filesystems first. The card is a standard 8GB SD card. The last time the system crashed was a result of an attempt to load ng_ubt: root@raspberry-pi:/boot/kernel # kldload netgraph root@raspberry-pi:/boot/kernel # kldload ng_ubt ubt0: on usbus0 root@raspberry-pi:/boot/kernel # WARNING: attempt to domain_add(bluetooth) after domainfinalize() dmWARNING: attempt to domain_add(netgraph) after domainfinalize() smsc0: warning: bulk read error, USB_ERR_IOERROR ubt0: ubt_bulk_read_callback:885: bulk-in transfer failed: USB_ERR_IOERROR eubt0: ubt_intr_read_callback:785: interrupt transfer failed: USB_ERR_IOERROR panic: hashdestroy: hash not empty KDB: enter: panic [ thread pid 2595 tid 100080 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> Any clues as to either one of the issues? Roel. From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 21:00:16 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 24C9B52E for ; Wed, 9 Jan 2013 21:00:16 +0000 (UTC) (envelope-from giovanni.trematerra@gmail.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id F1757DAC for ; Wed, 9 Jan 2013 21:00:15 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id x2so1941832iad.27 for ; Wed, 09 Jan 2013 13:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=c6tTMu3LhAdoEn9iq9fDJQMmsjbLP0sVuIgreXC2A+A=; b=SzRzezwUJ3fMHM9kqIqpHWNmKljVXP84lM+2JI6iJW77+1Lpnrzp+CqAUr1J9b2xGC oawfuwqSDrsfTvUA7CRdqY1HZ9E7F+Xegb33WUE7Y5VxqcsrI8kUwnROfDHQEeouRJrJ c6sNj4SZKqiMeSG+pSxpt/VyhWNkcHf8dYESaXkAy2IqCIugpTOGLZmIoI6/L2Fw7Uah qFFCf7iExVzsuwoATqPrSdUHhE3Lg3J1XPjyDFfXxGhl0LL3+bCfVMf4rvIO3b8UxjeC 2Auf0HSD+VnNgvr3NhMip5TgXTyfivdDVQLEwgRuMsnmBZzviuHNXjaNvXDgCecytIIY StZg== MIME-Version: 1.0 Received: by 10.50.173.71 with SMTP id bi7mr2595649igc.50.1357765215209; Wed, 09 Jan 2013 13:00:15 -0800 (PST) Sender: giovanni.trematerra@gmail.com Received: by 10.42.67.10 with HTTP; Wed, 9 Jan 2013 13:00:15 -0800 (PST) In-Reply-To: <20130109205029.GB3090@shuttle.bouwman.net> References: <20130109205029.GB3090@shuttle.bouwman.net> Date: Wed, 9 Jan 2013 22:00:15 +0100 X-Google-Sender-Auth: 9Xm9AjALMjVlqkdRMiIvK9b20T4 Message-ID: Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) From: Giovanni Trematerra To: Roel Bouwman Content-Type: text/plain; charset=UTF-8 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: Wed, 09 Jan 2013 21:00:16 -0000 On Wed, Jan 9, 2013 at 9:50 PM, Roel Bouwman wrote: > Hi Daisuke, > >> I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. > >> Now default transfer mode is DMA. If you want to use PIO(previous method), >> you can change it by following command anytime: > > I have been playing with the image for a few hours now, and have already > reflashed it three times. > > After a crash, the fsck at boot fails and causes a panic: > > Relevant info: > > sdhci_bcm0: mem 0xf2300000-0xf23000ff irq 70 on simplebus0 > bcm_sdhci_attach(): SDHCI frequency: 100MHz > mmc0: on sdhci_bcm0 > ... > > mmcsd0: 7695MB at mmc0 25.0MHz/4bit/65535-block > .. > Trying to mount root from ufs:/dev/mmcsd0s2a [rw,noatime]... > WARNING: / was not properly dismounted > WARNING: /: mount pending error: blocks 0 files 4 > warning: no time-of-day clock registered, system time will not be set accurately > Setting hostuuid: 12ffa981-59a2-11e2-8bd9-b827eb5f3b9e. > Setting hostid: 0x76c702b3. > Entropy harvesting: interrupts ethernet point_to_point kickstart. > Starting file system checks: > ** SU+J Recovering /dev/mmcsd0s2a > ** Reading 8388608 byte journal from inode 4. > ** Buildingp id 65 (fsck_ufs), uid 0: exited on signal 11 > recovery table. > panic: Bad link elm 0xc10fcb0c next->prev != elm > KDB: enter: panic > [ thread pid 65 tid 100049 ] > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > db> > > This is reprocedable each and every time the system shuts down without > unmounting the filesystems first. > > The card is a standard 8GB SD card. > > > The last time the system crashed was a result of an attempt to load ng_ubt: > > root@raspberry-pi:/boot/kernel # kldload netgraph > root@raspberry-pi:/boot/kernel # kldload ng_ubt > ubt0: on usbus0 > root@raspberry-pi:/boot/kernel # WARNING: attempt to domain_add(bluetooth) after domainfinalize() > dmWARNING: attempt to domain_add(netgraph) after domainfinalize() > smsc0: warning: bulk read error, USB_ERR_IOERROR > ubt0: ubt_bulk_read_callback:885: bulk-in transfer failed: USB_ERR_IOERROR > eubt0: ubt_intr_read_callback:785: interrupt transfer failed: USB_ERR_IOERROR > panic: hashdestroy: hash not empty > KDB: enter: panic > [ thread pid 2595 tid 100080 ] > Stopped at $d: ldrb r15, [r15, r15, ror r15]! > db> Could you show the backtrace? db> bt -- Gianni From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 21:23:18 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B2F9CDDD for ; Wed, 9 Jan 2013 21:23:18 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id 86C35EE5 for ; Wed, 9 Jan 2013 21:23:18 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 84FFE3A3A8; Thu, 10 Jan 2013 06:23:10 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 7E61939D62; Thu, 10 Jan 2013 06:23:10 +0900 (JST) Message-ID: <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> From: "Daisuke Aoyama" To: "Roel Bouwman" , References: <20130109205029.GB3090@shuttle.bouwman.net> In-Reply-To: <20130109205029.GB3090@shuttle.bouwman.net> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Thu, 10 Jan 2013 06:23:10 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Wed, 09 Jan 2013 21:23:18 -0000 Hi, Thank you for trying. > After a crash, the fsck at boot fails and causes a panic: Yes, I got same the error :) It is a bug of DMA transfer, you can continue with "set hw.bcm2835.sdhci.pio=1". If possible, try to enter loader prompt, then loader> set hw.bcm2835.sdhci.pio=1 loader> boot -v You can enter pressing space bar while the kernel loading. (only few sec.) If you don't have serial console, please add "hw.bcm2835.sdhci.pio=1" to /boot/rc.conf by other machine. After recovery, download new kernel then replace old one. # fetch http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130110.gz # gzcat kernel-20130110.gz > /boot/kernel/kernel # reboot Regards, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 21:34:26 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5B535DF; Wed, 9 Jan 2013 21:34:26 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id 2515EF5A; Wed, 9 Jan 2013 21:34:25 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 6A0F039E09; Thu, 10 Jan 2013 06:34:25 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 5580C39D62; Thu, 10 Jan 2013 06:34:25 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Mark Murray" References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> In-Reply-To: Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Thu, 10 Jan 2013 06:34:23 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-2022-jp"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Wed, 09 Jan 2013 21:34:26 -0000 > How do you build your images, please? I'm using Ti Kientzle's scripts, and they > don't produce the same runnable images that you have prodiced. I'm using gonzo's script with some little modifying. http://people.freebsd.org/~gonzo/arm/rpi/build-pi-image.sh My host is amd64/clang.(cc=clang) I didn't test with gcc. The test kernel is self building by clang in Raspberry Pi. Regards, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 22:52:37 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 E7A2D6A for ; Wed, 9 Jan 2013 22:52:37 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id 808C9265 for ; Wed, 9 Jan 2013 22:52:37 +0000 (UTC) Received: from [88.198.91.248] (helo=[IPv6:::1]) by id.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Tt4VZ-0005aT-1q for freebsd-arm@freebsd.org; Wed, 09 Jan 2013 14:52:30 -0800 Message-ID: <50EDF4AB.5060606@bluezbox.com> Date: Wed, 09 Jan 2013 14:52:27 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 1/8/2013 9:11 AM, Daisuke Aoyama wrote: > I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. > > Now default transfer mode is DMA. If you want to use PIO(previous > method), > you can change it by following command anytime: > > # sysctl hw.bcm2835.sdhci.pio=1 > > or add to /boot/loader.rc: > > set hw.bcm2835.sdhci.pio=1 > > major change: > o fix critical bug caused panic in arm/arm/vfp.c > o fix VFP compatibility for existing world/apps using SIGILL > o add TMPFS and UNIONFS kernel config > o use tmpfs as /tmp > o merge pmap-wb-caches-fix.diff and arm-autotune-fix.diff by gonzo > o assign all DMA(DMA0-12) IRQs in bcm2835-rpi-b.dts > o increase DI_MAX_INTR_NUM to 16 (necessary for DMA IRQs) > o call rman_set_virtual if SYS_RES_MEMORY > o add transfer and transfer_end method to dev/sdhci > o add simple DMA controller (does not support linked operation) > o test implement DMA transfer for SD card I/O > o add hw.bcm2835.sdhci.pio for PIO transfer (disabled by default) > > Note: > 512 byte chunk is used for each DMA transfer of SD because eMMC have > only 1KB FIFO. > PIO mode is always used for a request smaller than 512 byte. > DMA transfer is not so fast although the efficiency of the bus differs. > At this time, first trigger is invoked by same INT of PIO. > sys/dev/sdhci/sdhci.c should be rewritten to adapt the DMA controller. > > Known Problems: > To store correct values to DMA engine, it uses D-cache invalidate all. > (unknown reason, first chunk only) > Some code using VFP hang. [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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: Wed, 09 Jan 2013 22:52:38 -0000 On 1/8/2013 9:11 AM, Daisuke Aoyama wrote: > I have updated clang RPI code based on SVN r244906 + pmap-wb-caches-fix. > > Now default transfer mode is DMA. If you want to use PIO(previous > method), > you can change it by following command anytime: > > # sysctl hw.bcm2835.sdhci.pio=1 > > or add to /boot/loader.rc: > > set hw.bcm2835.sdhci.pio=1 > > major change: > o fix critical bug caused panic in arm/arm/vfp.c > o fix VFP compatibility for existing world/apps using SIGILL > o add TMPFS and UNIONFS kernel config > o use tmpfs as /tmp > o merge pmap-wb-caches-fix.diff and arm-autotune-fix.diff by gonzo > o assign all DMA(DMA0-12) IRQs in bcm2835-rpi-b.dts > o increase DI_MAX_INTR_NUM to 16 (necessary for DMA IRQs) > o call rman_set_virtual if SYS_RES_MEMORY > o add transfer and transfer_end method to dev/sdhci > o add simple DMA controller (does not support linked operation) > o test implement DMA transfer for SD card I/O > o add hw.bcm2835.sdhci.pio for PIO transfer (disabled by default) > > Note: > 512 byte chunk is used for each DMA transfer of SD because eMMC have > only 1KB FIFO. > PIO mode is always used for a request smaller than 512 byte. > DMA transfer is not so fast although the efficiency of the bus differs. > At this time, first trigger is invoked by same INT of PIO. > sys/dev/sdhci/sdhci.c should be rewritten to adapt the DMA controller. > > Known Problems: > To store correct values to DMA engine, it uses D-cache invalidate all. > (unknown reason, first chunk only) > Some code using VFP hang. Thank you, Daisuke-san. I'm going to merge DMA driver and DMA transfers support for SDHCI. Merging other SDHCI fixes require more testing (and spec reading) but they're on my ToDo list too. DMA driver needs some clean-up though before it can be committed to the tree. I'll post my notes on it when it's ready. From owner-freebsd-arm@FreeBSD.ORG Wed Jan 9 23:27:41 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 F37FC3A2 for ; Wed, 9 Jan 2013 23:27:40 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id A881734B for ; Wed, 9 Jan 2013 23:27:40 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 4208B39E09; Thu, 10 Jan 2013 08:27:38 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 2CA9139D62; Thu, 10 Jan 2013 08:27:38 +0900 (JST) Message-ID: <2D3E891FE9014C0B8403E27EBAFC9EF9@ad.peach.ne.jp> From: "Daisuke Aoyama" To: "Oleksandr Tymoshenko" , References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> <50EDF4AB.5060606@bluezbox.com> In-Reply-To: <50EDF4AB.5060606@bluezbox.com> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Thu, 10 Jan 2013 08:27:34 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Wed, 09 Jan 2013 23:27:41 -0000 >> Known Problems: >> To store correct values to DMA engine, it uses D-cache invalidate all. >> (unknown reason, first chunk only) > > Thank you, Daisuke-san. I'm going to merge DMA driver and DMA transfers > support for SDHCI. Merging other SDHCI fixes require more testing (and > spec reading) > but they're on my ToDo list too. DMA driver needs some clean-up though > before it can be committed to the tree. I'll post my notes on it when > it's ready. I forgot invalidating SDHCI side. I've fixed this issues. Please take from src-244906-20130110.patch.gz and new bcm2835_dma.[ch]. (dated 2013/Jan/10) So, now it should take invalidate range correctly instead of D-cache invalidate all. FYI, my patch fix: wrong high voltage selection in dev/mmc/mmc.c workaround missing error handling in dev/mmc/mmc.c wrong freq divider in dev/sdhci/sdhci.c workaround Raspberry Pi HS mode issue in dev/sdhci/sdhci.c Thanks, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Thu Jan 10 01:14:36 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 6B6FACE8 for ; Thu, 10 Jan 2013 01:14:36 +0000 (UTC) (envelope-from roel@bouwman.net) Received: from smtp01.qsp.nl (smtp01.qsp.nl [193.254.214.162]) by mx1.freebsd.org (Postfix) with ESMTP id 23DA0BE7 for ; Thu, 10 Jan 2013 01:14:35 +0000 (UTC) Received: from smtp01.qsp.nl (localhost [127.0.0.1]) by smtp01.qsp.nl (Postfix) with ESMTP id B0DA02A0C7D for ; Thu, 10 Jan 2013 02:14:33 +0100 (CET) Received: from nwg.bouwman.net (berl.bouwman.net [80.101.149.113]) by smtp01.qsp.nl (Postfix) with ESMTP for ; Thu, 10 Jan 2013 02:14:33 +0100 (CET) Received: by nwg.bouwman.net (Postfix, from userid 501) id A1D0045179; Thu, 10 Jan 2013 02:14:22 +0100 (CET) Date: Thu, 10 Jan 2013 02:14:22 +0100 From: Roel Bouwman To: freebsd-arm@freebsd.org Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Message-ID: <20130110011422.GC3090@shuttle.bouwman.net> References: <20130109205029.GB3090@shuttle.bouwman.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i 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, 10 Jan 2013 01:14:36 -0000 Gianni, On Wed, Jan 09, 2013 at 10:00:15PM +0100, you (Giovanni Trematerra) wrote the following: > Could you show the backtrace? Somewhat after the fact, as Daisuke has also experienced the same issue and already posted the solution. But to be complete: panic: Bad link elm 0xc10fcbd0 next->prev != elm KDB: enter: panic [ thread pid 65 tid 100049 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 65 tid 100049 td 0xc2fe8620 end() at 0xd49bf814 scp=0xd49bf814 rlv=0xc04054c4 (db_trace_thread+0x34) rsp=0xd49bf7f8 rfp=0xc053d728 Bad frame pointer: 0xc053d728 Booting with PIO (hw.bcm2835.sdhci.pio=1) solved the issue: Starting file system checks: ** SU+J Recovering /dev/mmcsd0s2a ** Reading 8388608 byte journal from inode 4. ** Building recovery table. ** Resolving unreferenced inode list. ** Processing journal entries. ** 271 journal records in 19968 bytes for 43.43% utilization ** Freed 50 inodes (0 dirs) 20 blocks, and 208 frags. ***** FILE SYSTEM MARKED CLEAN ***** Thanks! Roel. From owner-freebsd-arm@FreeBSD.ORG Thu Jan 10 12:36:31 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 520BC486 for ; Thu, 10 Jan 2013 12:36:31 +0000 (UTC) (envelope-from roel@bouwman.net) Received: from smtp01.qsp.nl (smtp01.qsp.nl [193.254.214.162]) by mx1.freebsd.org (Postfix) with ESMTP id 1A43DAF8 for ; Thu, 10 Jan 2013 12:36:30 +0000 (UTC) Received: from smtp01.qsp.nl (localhost [127.0.0.1]) by smtp01.qsp.nl (Postfix) with ESMTP id 6C9E02A0C53 for ; Thu, 10 Jan 2013 13:36:28 +0100 (CET) Received: from nwg.bouwman.net (berl.bouwman.net [80.101.149.113]) by smtp01.qsp.nl (Postfix) with ESMTP for ; Thu, 10 Jan 2013 13:36:28 +0100 (CET) Received: by nwg.bouwman.net (Postfix, from userid 501) id BE97445179; Thu, 10 Jan 2013 13:36:05 +0100 (CET) Date: Thu, 10 Jan 2013 13:36:05 +0100 From: Roel Bouwman To: freebsd-arm@freebsd.org Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Message-ID: <20130110123605.GC31212@shuttle.bouwman.net> References: <20130109205029.GB3090@shuttle.bouwman.net> <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> User-Agent: Mutt/1.4.2.3i 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, 10 Jan 2013 12:36:31 -0000 Hi Daisuke, On Thu, Jan 10, 2013 at 06:23:10AM +0900, you (Daisuke Aoyama) wrote the following: > After recovery, download new kernel then replace old one. > > # fetch http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130110.gz This kernel has exactly the same issue: FreeBSD 10.0-CURRENT #0 r244906M: Thu Jan 10 05:49:56 JST 2013 aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm ... Starting file system checks: ** SU+J Recovering /dev/mmcsd0s2a ** Reading 8388608 byte journal from inode 4. ** Building prid 65 (fsck_ufs), uid 0: exited on signal 11 ecovery table. panic: Bad link elm 0xc10e3dc8 next->prev != elm KDB: enter: panic [ thread pid 65 tid 100049 ] Stopped at breakpoint: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 65 tid 100049 td 0xc2fca620 end() at 0xd49ab9a8 scp=0xd49ab9a8 rlv=0xc03c8208 (db_trace_self+0x14) rsp=0xd49ab99c rfp=0xc04e6d14 Bad frame pointer: 0xc04e6d14 I'll just leave DMA disabled for now. Regards, Roel. From owner-freebsd-arm@FreeBSD.ORG Thu Jan 10 15:07:57 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 36449E87 for ; Thu, 10 Jan 2013 15:07:57 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id D38CA1F1 for ; Thu, 10 Jan 2013 15:07:56 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id B62A939E09; Fri, 11 Jan 2013 00:07:54 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id A1C3E39D62; Fri, 11 Jan 2013 00:07:54 +0900 (JST) Message-ID: <2678A4FBD40C409F9183A48F449C300F@ad.peach.ne.jp> From: "Daisuke Aoyama" To: "Roel Bouwman" , References: <20130109205029.GB3090@shuttle.bouwman.net> <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> <20130110123605.GC31212@shuttle.bouwman.net> In-Reply-To: <20130110123605.GC31212@shuttle.bouwman.net> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Fri, 11 Jan 2013 00:07:48 +0900 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0559_01CDEF8F.B0AAFC90" X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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, 10 Jan 2013 15:07:57 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0559_01CDEF8F.B0AAFC90 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Hi, > On Thu, Jan 10, 2013 at 06:23:10AM +0900, you (Daisuke Aoyama) wrote the following: >> After recovery, download new kernel then replace old one. >> >> # fetch http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130110.gz > > This kernel has exactly the same issue: > > FreeBSD 10.0-CURRENT #0 r244906M: Thu Jan 10 05:49:56 JST 2013 > aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm > ... > Starting file system checks: > ** SU+J Recovering /dev/mmcsd0s2a > ** Reading 8388608 byte journal from inode 4. > ** Building prid 65 (fsck_ufs), uid 0: exited on signal 11 > ecovery table. > panic: Bad link elm 0xc10e3dc8 next->prev != elm It seems READ DMA is still broken. How about this one? http://www.peach.ne.jp/archives/rpi/kernel/kernel-p1-20130110.gz The source fix is attached in this mail. Thanks, -- Daisuke Aoyama ------=_NextPart_000_0559_01CDEF8F.B0AAFC90 Content-Type: application/octet-stream; name="dmafix-20130101.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="dmafix-20130101.patch" --- bcm2835_sdhci.c-20130110 2013-01-10 05:26:42.000000000 +0900=0A= +++ bcm2835_sdhci.c 2013-01-10 23:49:13.000000000 +0900=0A= @@ -302,6 +302,13 @@=0A= bcm2835_asm_sdhci_write_4(slot->bus, slot, SDHCI_INT_STATUS,=0A= SDHCI_INT_DATA_END);=0A= =0A= + /* drain write buffer if READ case */=0A= + if (slot->curcmd->data->flags & MMC_DATA_READ) {=0A= + isb(); dsb(); /* memory barrier */=0A= + bcm2835_dma_wb_range(slot->curcmd->data->data,=0A= + slot->curcmd->data->len);=0A= + }=0A= +=0A= /* enable INT */=0A= slot->intmask |=3D SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL=0A= | SDHCI_INT_DATA_END;=0A= @@ -586,6 +593,12 @@=0A= & SDHCI_DATA_AVAILABLE) {=0A= bcm_sdhci_read_pio(slot);=0A= }=0A= + /* drain write buffer if READ && DMA+PIO case */=0A= + if (slot->curcmd->data->len >=3D 512) {=0A= + isb(); dsb(); /* memory barrier */=0A= + bcm2835_dma_wb_range(slot->curcmd->data->data,=0A= + slot->curcmd->data->len);=0A= + }=0A= } else {=0A= if (bcm2835_asm_sdhci_read_4(bus, slot, SDHCI_PRESENT_STATE)=0A= & SDHCI_SPACE_AVAILABLE) {=0A= @@ -602,9 +615,14 @@=0A= =0A= /* Now use DMA transfer */=0A= #ifdef DMA_DEBUG=0A= - printf("DMA transfer (left=3D%d,len=3D%d)\n", left, = slot->curcmd->data->len);=0A= - reg =3D bcm2835_asm_sdhci_read_4(bus, slot, SDHCI_INT_STATUS);=0A= - printf("reg=3D%x\n", reg);=0A= + {=0A= + volatile uint32_t reg;=0A= + printf("DMA transfer %s (left=3D%d,len=3D%d)\n",=0A= + (slot->curcmd->data->flags & MMC_DATA_READ) ? "read" : "write",=0A= + left, slot->curcmd->data->len);=0A= + reg =3D bcm2835_asm_sdhci_read_4(bus, slot, SDHCI_INT_STATUS);=0A= + printf("reg=3D%x\n", reg);=0A= + }=0A= #endif=0A= =0A= /* Disable INT */=0A= ------=_NextPart_000_0559_01CDEF8F.B0AAFC90-- From owner-freebsd-arm@FreeBSD.ORG Thu Jan 10 17:34:57 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 E7036725 for ; Thu, 10 Jan 2013 17:34:57 +0000 (UTC) (envelope-from roel@bouwman.net) Received: from smtp02.qsp.nl (smtp02.qsp.nl [193.254.214.163]) by mx1.freebsd.org (Postfix) with ESMTP id A35C9B0C for ; Thu, 10 Jan 2013 17:34:57 +0000 (UTC) Received: from smtp02.qsp.nl (localhost [127.0.0.1]) by smtp02.qsp.nl (Postfix) with ESMTP id 568E7FD051; Thu, 10 Jan 2013 18:27:18 +0100 (CET) Received: from nwg.bouwman.net (berl.bouwman.net [80.101.149.113]) by smtp02.qsp.nl (Postfix) with ESMTP; Thu, 10 Jan 2013 18:27:18 +0100 (CET) Received: by nwg.bouwman.net (Postfix, from userid 501) id DB9B545179; Thu, 10 Jan 2013 18:26:56 +0100 (CET) Date: Thu, 10 Jan 2013 18:26:56 +0100 From: Roel Bouwman To: Daisuke Aoyama Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Message-ID: <20130110172656.GD31212@shuttle.bouwman.net> References: <20130109205029.GB3090@shuttle.bouwman.net> <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> <20130110123605.GC31212@shuttle.bouwman.net> <2678A4FBD40C409F9183A48F449C300F@ad.peach.ne.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2678A4FBD40C409F9183A48F449C300F@ad.peach.ne.jp> User-Agent: Mutt/1.4.2.3i 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, 10 Jan 2013 17:34:58 -0000 Hi Daisuke, On Fri, Jan 11, 2013 at 12:07:48AM +0900, you (Daisuke Aoyama) wrote the following: > It seems READ DMA is still broken. > How about this one? > > http://www.peach.ne.jp/archives/rpi/kernel/kernel-p1-20130110.gz Unfortunately, no... FreeBSD 10.0-CURRENT #0 r244906M: Thu Jan 10 23:55:40 JST 2013 aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm ... pid 65 (fsck_ufs), uid 0: exited on signal 11 panic: Bad link elm 0xc10e0984 next->prev != elm KDB: enter: panic [ thread pid 65 tid 100049 ] Stopped at breakpoint: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 65 tid 100049 td 0xc2fcc620 end() at 0xd49ab9a8 scp=0xd49ab9a8 rlv=0xc03c8208 (db_trace_self+0x14) rsp=0xd49ab99c rfp=0xc04e6d54 Bad frame pointer: 0xc04e6d54 Regards, Roel. From owner-freebsd-arm@FreeBSD.ORG Fri Jan 11 02:35:05 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 7655F202 for ; Fri, 11 Jan 2013 02:35:05 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id 35522921 for ; Fri, 11 Jan 2013 02:35:04 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id A11C039E5C; Fri, 11 Jan 2013 11:34:57 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 9E0E739E56; Fri, 11 Jan 2013 11:34:57 +0900 (JST) Message-ID: <408D522039534682861D1B1AFBA9645E@ad.peach.ne.jp> From: "Daisuke Aoyama" To: "Roel Bouwman" References: <20130109205029.GB3090@shuttle.bouwman.net> <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> <20130110123605.GC31212@shuttle.bouwman.net> <2678A4FBD40C409F9183A48F449C300F@ad.peach.ne.jp> <20130110172656.GD31212@shuttle.bouwman.net> In-Reply-To: <20130110172656.GD31212@shuttle.bouwman.net> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Fri, 11 Jan 2013 11:34:52 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Fri, 11 Jan 2013 02:35:05 -0000 > Unfortunately, no... > > FreeBSD 10.0-CURRENT #0 r244906M: Thu Jan 10 23:55:40 JST 2013 > aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm > ... > pid 65 (fsck_ufs), uid 0: exited on signal 11 > panic: Bad link elm 0xc10e0984 next->prev != elm > KDB: enter: panic > [ thread pid 65 tid 100049 ] > Stopped at breakpoint: ldrb r15, [r15, r15, ror r15]! My test for above case, the kernel is crashed at pmap_nuke_pv() at /usr/src/sys/arm/arm/pmap-v6.c I don't know reason. But it seems caused after calling read_dma_next from DMA intr. -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Fri Jan 11 22:46:38 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 471F2571 for ; Fri, 11 Jan 2013 22:46:38 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id D181279C for ; Fri, 11 Jan 2013 22:46:37 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 1EA7039E56; Sat, 12 Jan 2013 07:46:36 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 1B24939D62; Sat, 12 Jan 2013 07:46:36 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Roel Bouwman" References: <20130109205029.GB3090@shuttle.bouwman.net> <1E4F692C2E774A5C9ED66CE1A502C261@ad.peach.ne.jp> <20130110123605.GC31212@shuttle.bouwman.net> <2678A4FBD40C409F9183A48F449C300F@ad.peach.ne.jp> <20130110172656.GD31212@shuttle.bouwman.net> In-Reply-To: <20130110172656.GD31212@shuttle.bouwman.net> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Sat, 12 Jan 2013 07:46:38 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Fri, 11 Jan 2013 22:46:38 -0000 Hi, > Unfortunately, no... > > FreeBSD 10.0-CURRENT #0 r244906M: Thu Jan 10 23:55:40 JST 2013 > aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm > ... > pid 65 (fsck_ufs), uid 0: exited on signal 11 > panic: Bad link elm 0xc10e0984 next->prev != elm > KDB: enter: panic > [ thread pid 65 tid 100049 ] > Stopped at breakpoint: ldrb r15, [r15, r15, ror r15]! I've uploaded final version. Please try this: http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130112.gz The source/patch is here: http://www.peach.ne.jp/archives/rpi/patch/bcm2835_asm.S http://www.peach.ne.jp/archives/rpi/patch/bcm2835_asm.h http://www.peach.ne.jp/archives/rpi/patch/bcm2835_dma.c http://www.peach.ne.jp/archives/rpi/patch/bcm2835_dma.h http://www.peach.ne.jp/archives/rpi/patch/src-244906-20130112.patch.gz Note: All user of freebsd-pi-clang-20130108.img.gz should update to kernel-20130112.gz. Regards, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Sat Jan 12 07:04:15 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 70A536C9 for ; Sat, 12 Jan 2013 07:04:15 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp3.clear.net.nz (smtp3.clear.net.nz [203.97.33.64]) by mx1.freebsd.org (Postfix) with ESMTP id 3578B869 for ; Sat, 12 Jan 2013 07:04:15 +0000 (UTC) Received: from mxin1-orange.clear.net.nz (lb2-srcnat.clear.net.nz [203.97.32.237]) by smtp3.clear.net.nz (CLEAR Net Mail) with ESMTP id <0MGI00IZ32XRFW10@smtp3.clear.net.nz> for freebsd-arm@freebsd.org; Sat, 12 Jan 2013 19:49:08 +1300 (NZDT) Received: from 202-0-48-19.paradise.net.nz (HELO localhost) ([202.0.48.19]) by smtpin1.paradise.net.nz with ESMTP; Sat, 12 Jan 2013 19:49:07 +1300 Date: Sat, 12 Jan 2013 19:49:02 +1300 From: Andrew Turner Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) In-reply-to: To: Daisuke Aoyama Message-id: <20130112194902.7e161b59@fubar.geek.nz> Organization: Home: smtp.paradise.net.nz Vodafone: smtp2.vodafone.net.nz MIME-version: 1.0 X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Pirate: Arrrr References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> 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: Sat, 12 Jan 2013 07:04:15 -0000 On Wed, 9 Jan 2013 02:11:12 +0900 "Daisuke Aoyama" wrote: ... > Source and pacth is here: > http://www.peach.ne.jp/archives/rpi/patch/ You have made changes to files in contrib/llvm/. Are these needed? Clang should be supported in head without any patches. I would like to know if there are any issues with the copy of llvm & clang we have so I can fix them. Andrew From owner-freebsd-arm@FreeBSD.ORG Sat Jan 12 08:49:21 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 0F2F37F7 for ; Sat, 12 Jan 2013 08:49:21 +0000 (UTC) (envelope-from dev@macdevshanghai.com) Received: from mail-qc0-f179.google.com (mail-qc0-f179.google.com [209.85.216.179]) by mx1.freebsd.org (Postfix) with ESMTP id B0E82B6E for ; Sat, 12 Jan 2013 08:49:20 +0000 (UTC) Received: by mail-qc0-f179.google.com with SMTP id b14so1602579qcs.38 for ; Sat, 12 Jan 2013 00:49:14 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=Y2fq0koQl0fdOm706s05s27UVfA5+SbH2/W4tHj3EIk=; b=c2pGtqzkMPR8ZxEAi4jsJLYYEovf9fvKnEwyE+C45Dvma7vDNFdfsUUzXYo+x5SaiX sqbJQOlPXmjsQ6yEiT/RgkvlbzO8QIjkJ82e0em0de/5QzXIwEY1prs15K+gaEiAz9Uc C6b03Y2Lnpl/t6W60YOZTy5sEy8MiPS/vALObxCvTfPHOE34jRph56MVOG+KehR/Gw9o 7VWqorBY90puLaIs3/wqa3obb7U+MQkOeyYQo1ASW0G5rsctKFAeNr3JZn+PISUp00p4 IlE5hfUgYw/tyiJtVBBCc4bcz09mNUcDJOCPDKqXL5w+kDQDC4wtDiDoQhuYQKblLXJA 8T7w== MIME-Version: 1.0 Received: by 10.224.117.70 with SMTP id p6mr51551872qaq.88.1357980554041; Sat, 12 Jan 2013 00:49:14 -0800 (PST) Received: by 10.49.97.70 with HTTP; Sat, 12 Jan 2013 00:49:13 -0800 (PST) X-Originating-IP: [101.228.106.104] In-Reply-To: <20130112194902.7e161b59@fubar.geek.nz> References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> <20130112194902.7e161b59@fubar.geek.nz> Date: Sat, 12 Jan 2013 16:49:13 +0800 Message-ID: Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) From: "Kong, Dev" To: Andrew Turner X-Gm-Message-State: ALoCoQkr9RLlPbT7KABlHvCropyqbvMVwLzXBQ5FXamdLdg0TA93NiG0q1bajPwRRVkBgMk1/K+D Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Sat, 12 Jan 2013 08:49:21 -0000 kernel http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130112.gz on My box boot error FreeBSD 10.0-CURRENT #0 r244906M: Sat Jan 12 06:55:09 JST 2013 aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm CPU: ARM1176JZ-S rev 7 (ARM11J core) Supported features: ARM_ISA THUMB2 JAZELLE ARMv4 Security_Ext WB enabled LABT 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 = 500744192 (477 MB) random device not loaded; using insecure entropy kbd0 at kbdmux0 simplebus0: mem 0xf2000000-0xf2ffffff on fdtbus0 intc0: mem 0xf200b200-0xf200b3ff on simplebus0 systimer0: mem 0xf2003000-0xf2003fff irq 8,9,10,11 on simplebus0 Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000 Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000 bcm2835_dma0: mem 0xf2007000-0xf2007fff,0xf2e05000-0xf2e05fff irq 26,27 on simplebus0 simplebus0: no default resources for rid = 2, type = 1 bcm2835_dma0: cannot allocate interrupt device_attach: bcm2835_dma0 attach returned 6 sdhci_bcm0: mem 0xf2300000-0xf23000ff irq 70 on simplebus0 bcm_sdhci_attach(): SDHCI frequency: 50MHz vm_fault(0xc05010d8, 0, 1, 0) -> 1 Fatal kernel mode data abort: 'Translation Fault (S)' trapframe: 0xc062ac80 FSR=00000005, FAR=00000014, spsr=600000d3 r0 =00000004, r1 =00000000, r2 =c0440ecb, r3 =000000ba r4 =c0440ecb, r5 =000000ba, r6 =00000014, r7 =c04022c3 r8 =00000032, r9 =c2e9ad00, r10=c2e9ad14, r11=c062ace0 r12=00000000, ssp=c062accc, slr=c023e6f8, pc =c023e708 [ thread pid 0 tid 100000 ] Stopped at __mtx_lock_flags+0x50: ldr r0, [r6] db> bt Tracing pid 0 tid 100000 td 0xc0500df0 end() at 0xc062a9f0 scp=0xc062a9f0 rlv=0xc03c8208 (db_trace_self+0x14) rsp=0xc062a9e4 rfp=0xc04e6d94 Bad frame pointer: 0xc04e6d94 2013/1/12 Andrew Turner > On Wed, 9 Jan 2013 02:11:12 +0900 > "Daisuke Aoyama" wrote: > ... > > Source and pacth is here: > > http://www.peach.ne.jp/archives/rpi/patch/ > > You have made changes to files in contrib/llvm/. Are these needed? > Clang should be supported in head without any patches. I would like to > know if there are any issues with the copy of llvm & clang we have so I > can fix them. > > Andrew > _______________________________________________ > 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" > From owner-freebsd-arm@FreeBSD.ORG Sat Jan 12 11:43:36 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 64E7F614 for ; Sat, 12 Jan 2013 11:43:36 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id EFB94231 for ; Sat, 12 Jan 2013 11:43:35 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 7C3EC39E09; Sat, 12 Jan 2013 20:43:27 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 67A3239D62; Sat, 12 Jan 2013 20:43:27 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Andrew Turner" References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp> <20130112194902.7e161b59@fubar.geek.nz> In-Reply-To: <20130112194902.7e161b59@fubar.geek.nz> Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Sat, 12 Jan 2013 20:43:31 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Sat, 12 Jan 2013 11:43:36 -0000 Hi, > You have made changes to files in contrib/llvm/. Are these needed? > Clang should be supported in head without any patches. I would like to > know if there are any issues with the copy of llvm & clang we have so I > can fix them. Did you run clang under ARM kernel? (not cross) I think no need patch to contrib/llvm if it use OABI only. I don't know about EABI. (currently dropped EABI in my patch) However, you can not use clang completely until other patch is applied. 1) no vmrs/vmsr op code (used by VFP) in contrib/binutils/gas/config/tc-arm.c 2) no enough text size in sys/arm/include/vmparam.h, config/RPI-B-test13 (32MB or more is recommended) 3) cannot change max text size in sys/arm/include/vmparam.h, sys/conf/options.arm I don't know why MAX size under VA is limited so small. The physical memory is allocated when it requires, isn't it? Thanks, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Sat Jan 12 11:58:35 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 239579E7 for ; Sat, 12 Jan 2013 11:58:35 +0000 (UTC) (envelope-from aoyama@peach.ne.jp) Received: from moon.peach.ne.jp (moon.peach.ne.jp [203.141.148.98]) by mx1.freebsd.org (Postfix) with ESMTP id A43FF2DB for ; Sat, 12 Jan 2013 11:58:34 +0000 (UTC) Received: from moon.peach.ne.jp (localhost [127.0.0.1]) by moon.peach.ne.jp (Postfix) with ESMTP id 1BBB539E09; Sat, 12 Jan 2013 20:58:33 +0900 (JST) Received: from artemis (unknown [172.18.0.20]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by moon.peach.ne.jp (Postfix) with ESMTPSA id 1821939D62; Sat, 12 Jan 2013 20:58:33 +0900 (JST) Message-ID: From: "Daisuke Aoyama" To: "Kong, Dev" , "Andrew Turner" References: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp><20130112194902.7e161b59@fubar.geek.nz> In-Reply-To: Subject: Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr) Date: Sat, 12 Jan 2013 20:58:07 +0900 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Mailer: Microsoft Windows Live Mail 14.0.8117.416 X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8117.416 X-Virus-Scanned: ClamAV using ClamSMTP 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: Sat, 12 Jan 2013 11:58:35 -0000 Hi, >kernel >http://www.peach.ne.jp/archives/rpi/kernel/kernel-20130112.gz >on My box boot error >FreeBSD 10.0-CURRENT #0 r244906M: Sat Jan 12 06:55:09 JST 2013 > aoyama@fbs.local:/usr/obj-rpi-clang/arm.armv6/usr/src/sys/RPI-B-test13 arm (snip) >bcm2835_dma0: mem 0xf2007000-0xf2007fff,0xf2e05000-0xf2e05fff irq >26,27 on simplebus0 >simplebus0: no default resources for rid = 2, type = 1 >bcm2835_dma0: cannot allocate interrupt >device_attach: bcm2835_dma0 attach returned 6 You must use 20130108 image or update boot partition because of: http://lists.freebsd.org/pipermail/freebsd-arm/2013-January/004555.html o assign all DMA(DMA0-12) IRQs in bcm2835-rpi-b.dts o increase DI_MAX_INTR_NUM to 16 (necessary for DMA IRQs) Thanks, -- Daisuke Aoyama From owner-freebsd-arm@FreeBSD.ORG Sat Jan 12 22:16:03 2013 Return-Path: Delivered-To: arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D95E0800 for ; Sat, 12 Jan 2013 22:16:03 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [88.198.91.248]) by mx1.freebsd.org (Postfix) with ESMTP id 7F776B01 for ; Sat, 12 Jan 2013 22:16:03 +0000 (UTC) Received: from [88.198.91.248] (helo=[IPv6:::1]) by id.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1Tu9Mj-000HYU-Ur; Sat, 12 Jan 2013 14:15:55 -0800 Message-ID: <50F1E092.1050905@bluezbox.com> Date: Sat, 12 Jan 2013 14:15:46 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: okuno.kohji@jp.panasonic.com, arm@freebsd.org Subject: Fwd: arm: cpu_switch() has bug? References: <20130109.193945.561808600309975779.okuno.kohji@jp.panasonic.com> In-Reply-To: <20130109.193945.561808600309975779.okuno.kohji@jp.panasonic.com> X-Forwarded-Message-Id: <20130109.193945.561808600309975779.okuno.kohji@jp.panasonic.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: Forwarding this email to more appropriate mailing list. Someone on arm@ might know the answer -------- Original Message -------- Subject: arm: cpu_switch() has bug? Date: Wed, 09 Jan 2013 19:39:45 +0900 (JST) From: Kohji Okuno Organization: Panasonic Corporation To: freebsd-current@FreeBSD.org [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 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: Sat, 12 Jan 2013 22:16:03 -0000 Forwarding this email to more appropriate mailing list. Someone on arm@ might know the answer -------- Original Message -------- Subject: arm: cpu_switch() has bug? Date: Wed, 09 Jan 2013 19:39:45 +0900 (JST) From: Kohji Okuno Organization: Panasonic Corporation To: freebsd-current@FreeBSD.org Hi, I have doubt if cpu_switch() of arm has a bug. In swtch.S:L.334, if newtd->td_pcb (this is in stack pointer for kernel) has an address accessed first for the old(current) thread, data_abort_fault may occur. When data_abort_fault occurs, data_abort_handler() tries to solve this address from kernel_map. In this time, curthread and curpcb are already updated in swtch.S:L.223-231. As this result, data_abort_handler() will occur data_abort_fault in trap.c:L.301, again. When I check, in other CPUs, after updating the root pointer of MMU, curthread and curpcb are updated. Would you please check this? Thanks, Kohji Okuno <> 215 ENTRY(cpu_switch) 216 stmfd sp!, {r4-r7, lr} 217 mov r6, r2 /* Save the mutex */ 218 219 .Lswitch_resume: 220 /* rem: r0 = old lwp */ 221 /* rem: interrupts are disabled */ 222 223 /* Process is now on a processor. */ 224 /* We have a new curthread now so make a note it */ 225 GET_CURTHREAD_PTR(r7) 226 str r1, [r7] 227 228 /* Hook in a new pcb */ 229 GET_PCPU(r7) 230 ldr r2, [r1, #TD_PCB] 231 str r2, [r7, #PC_CURPCB] 232 233 /* rem: r1 = new process */ 234 /* rem: interrupts are enabled */ ==== SNIP ==== 298 /* rem: r2 = old PCB */ 299 /* rem: r9 = new PCB */ 300 /* rem: interrupts are enabled */ 301 302 #ifdef ARM_VFP_SUPPORT 303 /* 304 * vfp_store will clear pcpu->pc_vfpcthread, save 305 * registers and state, and modify the control as needed. 306 * a future exception will bounce the backup settings in the fp unit. 307 * XXX vfp_store can't change r4 308 */ 309 GET_PCPU(r7) 310 ldr r8, [r7, #(PC_VFPCTHREAD)] 311 cmp r4, r8 /* old thread used vfp? */ 312 bne 1f /* no, don't save */ 313 cmp r1, r4 /* same thread ? */ 314 beq 1f /* yes, skip vfp store */ 315 #ifdef SMP 316 ldr r8, [r7, #(PC_CPU)] /* last used on this cpu? */ 317 ldr r3, [r2, #(PCB_VFPCPU)] 318 cmp r8, r3 /* last cpu to use these registers? */ 319 bne 1f /* no. these values are stale */ 320 #endif 321 add r0, r2, #(PCB_VFPSTATE) 322 bl _C_LABEL(vfp_store) 323 1: 324 #endif /* ARM_VFP_SUPPORT */ 325 326 /* r1 now free! */ 327 328 /* Third phase : restore saved context */ 329 330 /* rem: r2 = old PCB */ 331 /* rem: r9 = new PCB */ 332 /* rem: interrupts are enabled */ 333 334 ldr r5, [r9, #(PCB_DACR)] /* r5 = new DACR */ 335 mov r2, #DOMAIN_CLIENT 336 cmp r5, r2, lsl #(PMAP_DOMAIN_KERNEL * 2) /* Sw to kernel thread? */ 337 beq .Lcs_context_switched /* Yup. Don't flush cache */ 338 mrc p15, 0, r0, c3, c0, 0 /* r0 = old DACR */ <> 224 void 225 data_abort_handler(trapframe_t *tf) 226 { 227 struct vm_map *map; 228 struct pcb *pcb; 229 struct thread *td; 230 u_int user, far, fsr; 231 vm_prot_t ftype; 232 void *onfault; 233 vm_offset_t va; 234 int error = 0; 235 struct ksig ksig; 236 struct proc *p; 237 238 239 /* Grab FAR/FSR before enabling interrupts */ 240 far = cpu_faultaddress(); 241 fsr = cpu_faultstatus(); 242 #if 0 243 printf("data abort: %p (from %p %p)\n", (void*)far, (void*)tf->tf_pc, 244 (void*)tf->tf_svc_lr); 245 #endif 246 247 /* Update vmmeter statistics */ 248 #if 0 249 vmexp.traps++; 250 #endif 251 252 td = curthread; 253 p = td->td_proc; 254 255 PCPU_INC(cnt.v_trap); 256 /* Data abort came from user mode? */ 257 user = TRAP_USERMODE(tf); 258 259 if (user) { 260 td->td_pticks = 0; 261 td->td_frame = tf; 262 if (td->td_ucred != td->td_proc->p_ucred) 263 cred_update_thread(td); 264 265 } 266 /* Grab the current pcb */ 267 pcb = td->td_pcb; ==== SNIP ==== 299 300 /* fusubailout is used by [fs]uswintr to avoid page faulting */ 301 if (__predict_false(pcb->pcb_onfault == fusubailout)) { 302 tf->tf_r0 = EFAULT; 303 tf->tf_pc = (register_t)(intptr_t) pcb->pcb_onfault; 304 return; 305 } _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"