Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Dec 2012 15:08:21 +0100
From:      Ralf.Wenk@hs-karlsruhe.de
To:        freebsd-arm@freebsd.org
Subject:   Re: FreeBSD on Raspberry Pi 512MB (with U-Boot + ubldr)
Message-ID:  <E1TfWh4-00BZ82-Is@smtp.hs-karlsruhe.de>
In-Reply-To: <50B8058C.9030909@bluezbox.com>
References:  <3988C1622A974F19A9D3888F0334FF10@ad.peach.ne.jp>  <50B8058C.9030909@bluezbox.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello,

>> BTW, SDHCI is not yet stable?
>
> There is one issue with setting SDHCI clock. I'll commit fix later today.


I like to share some information about the SD card reading speed.

While exchanging the old boot sequence with then new one I once booted
with the new boot sequence but without an /boot/loader.rc file.

The reading speed achieved with
dd if=/dev/mmcsd0 of=/dev/null bs=1m count=100
from the SD card was 10 Mbyte/sec.

After creating the file with "echo 'fdt addr 0x100' > /boot/loader.rc"
and rebooting the reading speed achieved from the SD card was down to
2.8 Mbyte/sec.

Although the SDHCI frequency was shown on the second boot as double high as 
on the first (100MHz versus 50MHz) the reading speed was much lower.
I think the cause was the mmcsd bus bit width which was reported as 4 at
the first and as 1 at the second boot.

Deleting /boot/loader.rc or changing the SDHCI frequency down to 50Hz did
not regain the 4 mmcsd bus bit width shown at the first boot.
The differences between the boot messages are:

$ diff -u rpi-with-newbios rpi-with-newbios-lr
--- rpi-with-newbios    2012-12-01 13:40:03.000000000 +0100
+++ rpi-with-newbios-lr 2012-12-01 13:38:14.000000000 +0100
@@ -30,11 +30,10 @@
 DRAM:    384MB
 
 Device: disk
--
+\
 /boot/kernel/kernel data=0x35f5f8+0x1fe84 syms=[0x4+0x79640+0x4+0x5cfdf]
 Hit [Enter] to boot immediately, or any other key for command prompt.
 Booting [/boot/kernel/kernel]...               
-fdt_start: 0x00439650
 Kernel entry at 0x100100...
 Kernel args: (null)
 KDB: debugger backends: ddb
@@ -50,8 +49,8 @@
  WB enabled LABT branch prediction enabled
   16KB/32B 4-way instruction cache
   16KB/32B 4-way write-back-locking-C data cache
-real memory  = 134217728 (128 MB)
-avail memory = 125120512 (119 MB)
+real memory  = 536870912 (512 MB)
+avail memory = 386912256 (368 MB)
 random device not loaded; using insecure entropy
 simplebus0: <Flattened device tree simple bus> mem 0xf2000000-0xf2ffffff on 
fdtbus0
 intc0: <BCM2835 Interrupt Controller> mem 0xf200b200-0xf200b3ff on simplebus0
@@ -59,7 +58,7 @@
 Event timer "BCM2835 Event Timer 3" frequency 1000000 Hz quality 1000
 Timecounter "BCM2835 Timecounter" frequency 1000000 Hz quality 1000
 sdhci_bcm0: <Broadcom 2708 SDHCI controller> mem 0xf2300000-0xf23000ff irq 70 
on simplebus0
-bcm_sdhci_attach(): SDHCI frequency: 50MHz
+bcm_sdhci_attach(): SDHCI frequency: 100MHz
 mmc0: <MMC/SD bus> on sdhci_bcm0
 mbox0: <BCM2835 VideoCore Mailbox> mem 0xf200b880-0xf200b8bf irq 1 on 
simplebus0
 mbox0: [GIANT-LOCKED]
@@ -77,13 +76,12 @@
 usbus0: 480Mbps High Speed USB v2.0
 ugen0.1: <DWCOTG> at usbus0
 uhub0: <DWCOTG OTG Root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
-mmcsd0: 3781MB <SDHC SD04G 8.0 SN 288979219 MFG 09/2011 by 3 SD> at mmc0 
25.0MHz/4bit/65535-block
+mmcsd0: 3781MB <SDHC SD04G 8.0 SN 288979219 MFG 09/2011 by 3 SD> at mmc0 
25.0MHz/1bit/65535-block
 Root mount waiting for: usbus0
 uhub0: 1 port with 1 removable, self powered
 ugen0.2: <vendor 0x0424> at usbus0
 uhub1: <vendor 0x0424 product 0x9512, class 9/0, rev 2.00/2.00, addr 2> on 
usbus0
 uhub1: MTT enabled
-Root mount waiting for: usbus0
 uhub1: 3 ports with 2 removable, self powered
 Root mount waiting for: usbus0
 ugen0.3: <vendor 0x0424> at usbus0
@@ -95,14 +93,14 @@
@@ -102,7 +100,7 @@
 Entropy harvesting: interrupts ethernet point_to_point kickstart.
 Starting file system checks:
 /dev/mmcsd0s2a: FILE SYSTEM CLEAN; SKIPPING CHECKS
-/dev/mmcsd0s2a: clean, 393149 free (1125 frags, 49003 blocks, 0.2% 
fragmentation)
+/dev/mmcsd0s2a: clean, 393117 free (1125 frags, 48999 blocks, 0.2% 
fragmentation)
 Mounting local file systems:.
 Writing entropy file:.
 Setting hostname: raspberry-pi.

First boot:
root@raspberry-pi:~ # dd if=/dev/mmcsd0 of=/dev/null bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 9.715465 secs (10792855 bytes/sec)

Second boot:
root@raspberry-pi:~ # dd if=/dev/mmcsd0 of=/dev/null bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 36.061109 secs (2907775 bytes/sec)

Kind regards, Ralf




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