Date: Sat, 29 Dec 2012 12:40:59 -0800 From: Thomas Skibo <ThomasSkibo@sbcglobal.net> To: freebsd-arm@freebsd.org Subject: FreeBSD on Zedboard (Xilinx Zynq-7000) Message-ID: <50DF555B.9060601@sbcglobal.net> In-Reply-To: <50DF4BD9.8080601@sbcglobal.net> References: <50DF4BD9.8080601@sbcglobal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------070705020506020703020902 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hello. I have been tinkering with this for several weeks: I booted FreeBSD on a Zedboard (a low-cost evaluation board for the Xilinx Zynq-7000 SoC). It was just a matter of coming up with a device tree file, implementing a UART driver, attaching the generic sdhci driver to the Zynq's SD hardware, and adding a new CPU id. I don't have an ethernet driver yet but I've started on it. I created an sdhci_fdt driver based on sdhci_pci.c. It should be useful for other platforms. I won't be surprised if somebody points out there is one already. One thing that stumped me for a while is that the interrupt controller driver, gic.c, does not initialize the priority mask register (GICC_PMR). The boot-loader left it at zero which masked all interrupts. For now, I plug 0xff into it in my initarm_late_init() function in zynq7_machdep.c. I'll provide my source soon. I want to do a few clean-ups of course and I'll take any feed-back on my naming conventions and how I organized the files. Thanks, -- -------- Thomas Skibo ThomasSkibo@sbcglobal.net --------------070705020506020703020902 Content-Type: text/plain; charset=UTF-8; name="boot2.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="boot2.txt" CnplZC1ib290PiB0ZnRwIDB4MTAwMDAwIGtlcm5lbC5iaW4KVXNpbmcgenlucV9nZW0gZGV2 aWNlClRGVFAgZnJvbSBzZXJ2ZXIgMTkyLjE2OC4yLjEwOyBvdXIgSVAgYWRkcmVzcyBpcyAx OTIuMTY4LjIuMTEKRmlsZW5hbWUgJ2tlcm5lbC5iaW4nLgpMb2FkIGFkZHJlc3M6IDB4MTAw MDAwCkxvYWRpbmc6ICoIIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj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NyYy9zeXMvWkVEQk9BUkQgIGFybQpy b290QHplZGJvYXJkOi8gIyBoYWx0CkRlYyAyOSAwNDowNzozNiB6ZWRib2FyZCBoYWx0OiBo YWx0ZWQgYnkgcm9vdApEZWMgMjkgMDQ6MDc6MzkgemVkYm9hcmQgc3lzbG9nZDogZXhpdGlu ZyBvbiBzaWduYWwgMTUKV2FpdGluZyAobWF4IDYwIHNlY29uZHMpIGZvciBzeXN0ZW0gcHJv Y2VzcyBgdm5scnUnIHRvIHN0b3AuLi5kb25lCldhaXRpbmcgKG1heCA2MCBzZWNvbmRzKSBm b3Igc3lzdGVtIHByb2Nlc3MgYGJ1ZmRhZW1vbicgdG8gc3RvcC4uLmRvbmUKV2FpdGluZyAo bWF4IDYwIHNlY29uZHMpIGZvciBzeXN0ZW0gcHJvY2VzcyBgc3luY2VyJyB0byBzdG9wLi4u ClN5bmNpbmcgZGlza3MsIHZub2RlcyByZW1haW5pbmcuLi4yIDEgMCBkb25lClN5bmNpbmcg ZGlza3MsIGJ1ZmZlcnMgcmVtYWluaW5nLi4uIDYgNiA2IDYgNiA2IDYgNiA2IDYgNSA1IDUg NSA1IDUgNSA1IDUgNSA1IDUgNCA0IDQgNCA0IDQgNCA0IDQgNCA0IDQgMyAzIDMgMyAzIDMg MyAzIDMgMyAzIDMgCkZpbmFsIHN5bmMgY29tcGxldGUKVXB0aW1lOiA1Mm01MXMKClRoZSBv cGVyYXRpbmcgc3lzdGVtIGhhcyBoYWx0ZWQuClBsZWFzZSBwcmVzcyBhbnkga2V5IHRvIHJl Ym9vdC4KCgo= --------------070705020506020703020902--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50DF555B.9060601>