Date: Sun, 31 Jul 2016 10:55:47 -0700 From: Thomas Skibo <thomasskibo@yahoo.com> To: freebsd-arm@freebsd.org Subject: Zynq/Zybo USB bug: ubldr "fixes" my device tree Message-ID: <7C4D45AC-3DDB-46FE-85AB-5F692E5C1283@yahoo.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello.
I finally tracked down a bug that kept me from being able to use a USB drive as root on a Zybo (or Zedboard). Mounting USB drives has worked fine before but using one as root would fail.
The first megabyte of memory space on Zynq has several caveats including a hole between 256K-512K that is inaccessible by bus masters. My solution was to simply ignore the first megabyte by starting memory at 0x100000 in my DTS file(s). But, I discovered that the first megabyte was being allocated and the ehci device hung trying to DMA to the hole. It turns out that ubldr, after loading the board.dtb file, proceeded to “fix up” the device tree from memory range information it got in a sysinfo call to u-boot’s API. The memory range started at 0.
The simplest work-around seems to be to add a “memreserve” property to the DTS. Also, It turns out that only the first half megabyte needs to be ignored. Patch attached.
—
Thomas Skibo
thomasskibo@yahoo.com
[-- Attachment #2 --]
Index: sys/boot/fdt/dts/arm/zynq-7000.dtsi
===================================================================
--- sys/boot/fdt/dts/arm/zynq-7000.dtsi (revision 303418)
+++ sys/boot/fdt/dts/arm/zynq-7000.dtsi (working copy)
@@ -32,6 +32,10 @@
#size-cells = <1>;
interrupt-parent = <&GIC>;
+ // Reserve first half megabyte because it is not accessible to all
+ // bus masters.
+ memreserve = <0x00000000 0x00080000>;
+
// Zynq PS System registers.
//
ps7sys@f8000000 {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7C4D45AC-3DDB-46FE-85AB-5F692E5C1283>
