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.