Zynq/Zybo USB bug: ubldr "fixes" my device tree

Thomas Skibo thomasskibo at yahoo.com
Sun Jul 31 17:58:48 UTC 2016


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 at yahoo.com


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch.zynq-7000.dtsi.txt
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20160731/6e8a7b25/attachment.txt>


More information about the freebsd-arm mailing list