Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2013 02:11:12 +0900
From:      "Daisuke Aoyama" <aoyama@peach.ne.jp>
To:        <freebsd-arm@freebsd.org>
Subject:   Re: FreeBSD/armv6z/clang on Raspberry Pi 512MB (with U-Boot + ubldr)
Message-ID:  <E48DEAF481F74C69A1BC7A01F2B8E74A@ad.peach.ne.jp>
In-Reply-To: <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp>
References:  <B5F827FF91C94FF2AFEE00194A2BB2C5@ad.peach.ne.jp> <B508111FCE534B2CBA61F4D1EC1078D3@ad.peach.ne.jp> <D3ABE3919EA74D668DB060952B5CD8C0@ad.peach.ne.jp> <2659960079254C38ACD2F1DCBB7A1A19@ad.peach.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
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
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E48DEAF481F74C69A1BC7A01F2B8E74A>