From owner-freebsd-arm@FreeBSD.ORG Sun May 17 18:35:39 2015 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FCC59A8 for ; Sun, 17 May 2015 18:35:39 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 286111F02 for ; Sun, 17 May 2015 18:35:39 +0000 (UTC) Received: by wizk4 with SMTP id k4so53037441wiz.1 for ; Sun, 17 May 2015 11:35:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:hackerspace:user-agent; bh=ZYCAeFMh0++7BN5csj/vcUvO6Dk7+pz3HjJVTgfihFs=; b=rnLeQ/pEkZjSbBKOA8/o5AFZvGumc+//FIxpEFjuHpPFUn1FUvw9SppTSAaE7z0wks H6Iv22g3pdLzPGmHWNOhL8YoMFXZDWITHJ4niOCXUbgrZ5NWpKsi53LIIYXDeNUMYhBr 6Pqph7lwS2cmq82pMiiGxvl00zn4ceNif1t1hPsJjIC4BK4ZrRp4jVHzKO4jkwpTT/sT B/8emDwVrU4SY780e/S4Zng355mNOCK7Bv2FuHiqW+VbZ9R06roM5NFSbiSPCaZ28+/3 W62Ak7oZZbWjOhiJTfBeeRoZFQKYQXaWeB81z1w1omltJg1VccM07vIK6LsqBqGgFair UhOQ== X-Received: by 10.180.91.137 with SMTP id ce9mr15125320wib.76.1431887737446; Sun, 17 May 2015 11:35:37 -0700 (PDT) Received: from gmail.com (host81-159-207-134.range81-159.btcentralplus.com. [81.159.207.134]) by mx.google.com with ESMTPSA id ej5sm613488wjd.22.2015.05.17.11.35.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 May 2015 11:35:36 -0700 (PDT) Sender: Tom Jones Date: Sun, 17 May 2015 19:35:33 +0100 From: Tom Jones To: freebsd-arm@freebsd.org Subject: Re: USB Armory support Message-ID: <20150517183532.GA4059@gmail.com> References: <1431884163.91685.55.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="Qxx1br4bt0+wmkIi" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1431884163.91685.55.camel@freebsd.org> Hackerspace: 57North Hacklab User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2015 18:35:39 -0000 --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, May 17, 2015 at 11:36:03AM -0600, Ian Lepore wrote: > On Sun, 2015-05-17 at 17:51 +0100, Sevan / Venture37 wrote: > > Hi, > > Has anyone looked at running FreeBSD on the USB Armory device? > > > > https://inversepath.com/usbarmory.html > > https://media.ccc.de/browse/congress/2014/31c3_-_6541_-_en_-_saal_2_-_201412281730_-_forging_the_usb_armory_-_andrea_barisani.html#video > > > > > > Sevan / Venture37 > > I've thought about it, but don't really have enough free time to buy one > just to play with right now. I'd be willing to get one and put some > effort into it if people have an interest in it. In theory it shouldn't > take too much work since we already have basic support for other imx5x > boards. > I have one and started working on a port last week. I used modified the dts available here[1] and worked from the IMX53-QSB kernel config. I hit a translation fault on usbphy attach. [1]: https://github.com/inversepath/usbarmory/tree/master/software/kernel_conf -- Tom @adventureloop adventurist.me 'You realize night time makes up half of all time?' :wq --Qxx1br4bt0+wmkIi Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline; filename=dmesg Content-Transfer-Encoding: 8bit Connected U-Boot 2015.04 (May 07 2015 - 15:19:06) CPU: Freescale i.MX53 rev2.1 at 800 MHz Reset cause: POR Board: Inverse Path USB armory MkI I2C: ready DRAM: 512 MiB MMC: FSL_SDHC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: CPU Net Initialization Failed No ethernet found. Hit any key to stop autoboot: 0 => loady 0x71000000 ## Ready for binary (ymodem) download to 0x71000000 at 115200 bps... C~CLocal command? lsz -Y kernel.bin Sending: kernel.bin Bytes Sent:5566464 BPS:11022 Sending: Ymodem sectors/kbytes sent: 0/ 0k Transfer complete xyzMµ- CRC mode, 2(SOH)/5436(STX)/0(CAN) packets, 3 retries ## Total Size = 0x0054ef9c = 5566364 Bytes => go 0x71000000 ## Starting application at 0x71000000 ... KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2015 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #1 r282665M: Tue May 12 20:43:21 BST 2015 root@towel:/usr/obj/arm.armv6/usr/home/jones/code/usbarmory/sys/IMX53-ARMORY arm FreeBSD clang version 3.6.0 (tags/RELEASE_360/final 230434) 20150225 WARNING: WITNESS option enabled, expect reduced performance. Preloaded elf kernel "kernel" at 0xc06cfab4. CPU: Cortex A8-r2 rev 5 (Cortex-A core) Supported features: ARM_ISA THUMB2 JAZELLE THUMBEE ARMv4 Security_Ext WB disabled EABT branch prediction enabled LoUU:2 LoC:3 LoUIS:1 Cache level 1: 32KB/64B 4-way data cache WT WB Read-Alloc 32KB/64B 4-way instruction cache Read-Alloc Cache level 2: 256KB/64B 8-way unified cache WT WB Read-Alloc Write-Alloc real memory = 536870912 (512 MB) avail memory = 514138112 (490 MB) Physical memory chunk(s): 0x70000000 - 0x8fffffff, 512 MB ( 131072 pages) Excluded memory regions: 0x71000000 - 0x71644fff, 6 MB ( 1605 pages) NoAlloc Static device mappings: 0x50000000 - 0x500fffff mapped at VA 0xffe00000 0x53f00000 - 0x53ffffff mapped at VA 0xffd00000 0x63f00000 - 0x63ffffff mapped at VA 0xffc00000 wlan: <802.11 Link Layer> random: entropy device infrastructure driver random: selecting highest priority adaptor random: SOFT: yarrow init() random: selecting highest priority adaptor mem: nfslock: pseudo-device null: openfirm: ofwbus0: simplebus0: on ofwbus0 simplebus1: mem 0x50000000-0x5fffffff on simplebus0 simplebus2: mem 0x50000000-0x5003ffff on simplebus1 simplebus3: mem 0x60000000-0x6fffffff on simplebus0 imxccm0: mem 0x53fd4000-0x53fd7fff irq 0,71,4,0,72,4 on simplebus1 simplebus1: no default resources for rid = 1, type = 3 imxccm0: could not allocate resources device_attach: imxccm0 attach returned 6 imx_iomux0: mem 0x53fa8000-0x53fabfff on simplebus1 Processing 1 pin-config node(s) in pinctrl-0 for esdhc@50004000 esdhc1grp: muxreg 0x02e4 muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x066c padval 0x000001d5 esdhc1grp: muxreg 0x02e8 muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x0670 padval 0x000001d5 esdhc1grp: muxreg 0x02f0 muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x0678 padval 0x000001d5 esdhc1grp: muxreg 0x02f8 muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x0680 padval 0x000001d5 esdhc1grp: muxreg 0x02ec muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x0674 padval 0x000001d5 esdhc1grp: muxreg 0x02f4 muxval 0x00 inpreg 0x0000 inpval 0x00 padreg 0x067c padval 0x000001d5 Processing 1 pin-config node(s) in pinctrl-0 for iomuxc@53fa8000 hoggrp: muxreg 0x0314 muxval 0x03 inpreg 0x0000 inpval 0x00 padreg 0x06a4 padval 0x80000000 hoggrp: muxreg 0x0338 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x06c8 padval 0x80000000 hoggrp: muxreg 0x02dc muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x0660 padval 0x80000000 hoggrp: muxreg 0x02e0 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x0664 padval 0x80000000 hoggrp: muxreg 0x01c8 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x0518 padval 0x80000000 hoggrp: muxreg 0x01cc muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x051c padval 0x80000000 hoggrp: muxreg 0x0290 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x0610 padval 0x80000000 hoggrp: muxreg 0x0298 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x0618 padval 0x80000000 hoggrp: muxreg 0x033c muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x06cc padval 0x80000000 Processing 1 pin-config node(s) in pinctrl-0 for serial@53fbc000 uart1grp: muxreg 0x00e8 muxval 0x02 inpreg 0x0000 inpval 0x00 padreg 0x0414 padval 0x000001e4 uart1grp: muxreg 0x00ec muxval 0x02 inpreg 0x0878 inpval 0x01 padreg 0x0418 padval 0x000001e4 Processing 1 pin-config node(s) in pinctrl-0 for leds led_gpio4_27@0: muxreg 0x0078 muxval 0x01 inpreg 0x0000 inpval 0x00 padreg 0x03a4 padval 0x80000000 imxccm0: mem 0x53fd4000-0x53fd7fff irq 0,71,4,0,72,4 on simplebus1 simplebus1: no default resources for rid = 1, type = 3 imxccm0: could not allocate resources device_attach: imxccm0 attach returned 6 tzic0: mem 0xfffc000-0xfffffff on ofwbus0 imxccm0: mem 0x53fd4000-0x53fd7fff irq 0,71,4,0,72,4 on simplebus1 simplebus1: no default resources for rid = 1, type = 3 imxccm0: could not allocate resources device_attach: imxccm0 attach returned 6 imx_gpt0: mem 0x53fa0000-0x53fa3fff irq 39 on simplebus1 imx_gpt0: Running on 0KHz clock, base freq 0Hz CR=0x0000027d, PR=0x00000000 Event timer "iMXGPT" quality 800 Timecounter "iMXGPT" frequency 0 Hz quality 1000 imxccm0: mem 0x53fd4000-0x53fd7fff irq 0,71,4,0,72,4 on simplebus1 simplebus1: no default resources for rid = 1, type = 3 imxccm0: could not allocate resources device_attach: imxccm0 attach returned 6 ofwbus0: compat fsl,imx-display-subsystem (no driver attached) simplebus0: mem 0x10000000-0x10000fff irq 28 disabled compat fsl,imx53-ahci (no driver attached) simplebus0: mem 0x18000000-0x1fffffff irq 11,10 compat fsl,imx53-ipu (no driver attached) simplebus2: mem 0x50004000-0x50007fff irq 1 compat fsl,imx53-esdhc (no driver attached) simplebus2: mem 0x50008000-0x5000bfff irq 2 disabled compat fsl,imx53-esdhc (no driver attached) simplebus2: mem 0x5000c000-0x5000ffff irq 33 disabled compat fsl,imx53-uart (no driver attached) simplebus2: mem 0x50010000-0x50013fff irq 36 disabled compat fsl,imx53-ecspi (no driver attached) simplebus2: mem 0x50014000-0x50017fff irq 30 disabled compat fsl,imx53-ssi (no driver attached) simplebus2: mem 0x50020000-0x50023fff irq 3 disabled compat fsl,imx53-esdhc (no driver attached) simplebus2: mem 0x50024000-0x50027fff irq 4 disabled compat fsl,imx53-esdhc (no driver attached) simplebus1: mem 0x53f00000-0x53f0005f compat fsl,imx53-aipstz (no driver attached) usbphy0: on simplebus1 Fatal kernel mode data abort: 'Translation Fault (L1)' on read trapframe: 0xc070acd0 FSR=00000005, FAR=00000004, spsr=600001d3 r0 =00000000, r1 =c051bb0c, r2 =c0624524, r3 =c0624524 r4 =c06d035c, r5 =c28ac800, r6 =c28ac538, r7 =00000000 r8 =c058f67a, r9 =c28ac550, r10=8f565544, r11=c070ad68 r12=c06a0adc, ssp=c070ad60, slr=c051aee0, pc =c051aef4 [ thread pid 0 tid 100000 ] Stopped at imx_ccm_usbphy_enable+0x20: ldr r1, [r0, #0x004] db> --Qxx1br4bt0+wmkIi--