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