Created attachment 173141 [details] patch to zynq-7000.dtsi A Zynq/Zybo system cannot mount a USB drive/stick as the root filesystem. The problem is the the ehci driver tries to DMA to a location in the first half megabyte of memory space which has several caveats on Zynq including a hole between 256K-512K that is inaccessible by bus masters. Originally, I tried to avoid something like this happening by starting memory at 0x100000 in the Zynq DTS file. But, ubldr "fixes up" memory ranges using information from u-boot (retrieved by a sysinfo call to the API). That causes the kernel to allocate the first megabyte. 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 excluded.
A commit references this bug: Author: gonzo Date: Wed Aug 3 18:03:14 UTC 2016 New revision: 303726 URL: https://svnweb.freebsd.org/changeset/base/303726 Log: Fix EHCI driver by excluding first 512K from available memory On Zynq 256K-512K memory region is not accessible by all bus masters. EHCI driver fails when trying to use it for DMA transfers. Patching memory node does not help because ubldr overrides values there with the ones obtained from u-boot. So as a workaround we just mark first 512K as reserved. PR: 211484 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com> MFC after: 3 days Changes: head/sys/boot/fdt/dts/arm/zynq-7000.dtsi
A commit references this bug: Author: gonzo Date: Mon Aug 8 17:53:51 UTC 2016 New revision: 303839 URL: https://svnweb.freebsd.org/changeset/base/303839 Log: MFC r303726 Fix EHCI driver by excluding first 512K from available memory On Zynq 256K-512K memory region is not accessible by all bus masters. EHCI driver fails when trying to use it for DMA transfers. Patching memory node does not help because ubldr overrides values there with the ones obtained from u-boot. So as a workaround we just mark first 512K as reserved. PR: 211484 Submitted by: Thomas Skibo <thoma555-bsd@yahoo.com> Approved by: re (gjb) Changes: _U stable/11/ stable/11/sys/boot/fdt/dts/arm/zynq-7000.dtsi