From owner-freebsd-arm@FreeBSD.ORG Thu Feb 28 22:02:23 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 4AF1FD2F for ; Thu, 28 Feb 2013 22:02:23 +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 C476866C for ; Thu, 28 Feb 2013 22:02:22 +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 1UBBYQ-000DMU-3S; Thu, 28 Feb 2013 14:02:20 -0800 Message-ID: <512FD3E8.4000307@bluezbox.com> Date: Thu, 28 Feb 2013 14:02:16 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 To: Daisuke Aoyama 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/29/2013 10:10 AM, Daisuke Aoyama wrote: > I've updated clang RPI code based on SVN r246066. > This is OABI version. I plan to try EABI next if possible. > > major change: > o update base tree to SVN r246066. > o implement -mload-store-multiple/-mno-load-store-multiple option in > clang/llvm. (workaround only) > o re-enable __clear_cache() in libgcc. > o bugfix bcm2835_dma inline asm code, etc. > o use bcm2835_dma_wb/wbinv in SDHCI. > o add USB LAN and wireless LAN driver module. (loaded by devd > automatically) > o move swap to head of partition. > o use label mount instead of /dev/mmcsd0s2a, /dev/mmcsd0s2b. > o add wireless lan, quota, ipfw and IPv6 to kernel config. > o change default HS mode is enabled. > > To prevent a fault on ldm/stm generated by clang, all files are > complied with: > CFLAGS=-O2 -mno-global-merge -mno-load-store-multiple > -fno-strict-aliasing -pipe -mabi=apcs-gnu -march=armv6z > -mtune=arm1176jzf-s -mfloat-abi=soft > > To reduce time in DMA intr, it uses bcm2835_dma_wb/wbinv directly. > Now it gets 20.7MB/s DMA transfer rate on class 10 SD card. (depend on > card spec) > It's 30% faster than bus_space_XXX/bus_dmamap_XXX. > >> root@raspberry-pi:~ # dd if=/dev/mmcsd0 of=/dev/null bs=1m count=32 >> 32+0 records in >> 32+0 records out >> 33554432 bytes transferred in 1.617316 secs (20746986 bytes/sec) > > Known issue: > DMA intr might be delayed by slow interrupt handler. > (arm/intr.c:arm_handler_execute specific, should be remapped DMA IRQ > to low number) [...] 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] 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, 28 Feb 2013 22:02:23 -0000 On 1/29/2013 10:10 AM, Daisuke Aoyama wrote: > I've updated clang RPI code based on SVN r246066. > This is OABI version. I plan to try EABI next if possible. > > major change: > o update base tree to SVN r246066. > o implement -mload-store-multiple/-mno-load-store-multiple option in > clang/llvm. (workaround only) > o re-enable __clear_cache() in libgcc. > o bugfix bcm2835_dma inline asm code, etc. > o use bcm2835_dma_wb/wbinv in SDHCI. > o add USB LAN and wireless LAN driver module. (loaded by devd > automatically) > o move swap to head of partition. > o use label mount instead of /dev/mmcsd0s2a,/dev/mmcsd0s2b. > o add wireless lan, quota, ipfw and IPv6 to kernel config. > o change default HS mode is enabled. > > To prevent a fault on ldm/stm generated by clang, all files are > complied with: > CFLAGS=-O2 -mno-global-merge -mno-load-store-multiple > -fno-strict-aliasing -pipe -mabi=apcs-gnu -march=armv6z > -mtune=arm1176jzf-s -mfloat-abi=soft > > To reduce time in DMA intr, it uses bcm2835_dma_wb/wbinv directly. > Now it gets 20.7MB/s DMA transfer rate on class 10 SD card. (depend on > card spec) > It's 30% faster than bus_space_XXX/bus_dmamap_XXX. > >> root@raspberry-pi:~ # dd if=/dev/mmcsd0 of=/dev/null bs=1m count=32 >> 32+0 records in >> 32+0 records out >> 33554432 bytes transferred in 1.617316 secs (20746986 bytes/sec) > > Known issue: > DMA intr might be delayed by slow interrupt handler. > (arm/intr.c:arm_handler_execute specific, should be remapped DMA IRQ > to low number) Hi Daisuke, I'd like to thank you again for your outstanding work. I've just committed three patches based on your code: - Platform DMA support for SDHCI - DMA engine driver - DMA support for BCM2835 SDHCI driver I made some architectural changes to them in order to make code compatible with FreeBSD codebase style. Namely: - Replaced direct access to DMA control blocks with calls to API - Make both DMA and SDHCI driver use bus_dma and bus_space interface. You've pinpointed several pain points with bus_space and bus_dma but I believe they should be addressed in more general fashion, for as many ARM platforms as possible that's why I left them in the committed version.