From owner-freebsd-arm@freebsd.org Fri Dec 18 23:24:52 2015 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D0DAA4C94E for ; Fri, 18 Dec 2015 23:24:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22e.google.com (mail-io0-x22e.google.com [IPv6:2607:f8b0:4001:c06::22e]) (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 4FF001E9C for ; Fri, 18 Dec 2015 23:24:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22e.google.com with SMTP id o67so105326093iof.3 for ; Fri, 18 Dec 2015 15:24:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=1/321ciyoRdnyqEAeSh9/PvCJIVzu6mHiMkER3G6/0g=; b=nFba77o3WwCLQdHqmfMmw4agxsG2kXJxFEdMhI+kvJDv+TWL2OMFgOyHKz8aav1VWH sSsB/lYQptaHEcfkcPrdnBCWE4moLcSjNjKO8+kB7OnOrHYoKV9GU0lCWzV7Cs67MFvQ VP2Tyka45zhMRqoZEoQl24jsjrOi+js0uU33u6P4Tpc8AKigcEumqoLQOMh/N8dfb6Lj tWexu4k0G6M6bo2c/F48jcUelV1EW7X3BaeqAANlBD1nWH3467bANJpaSVpAw/hvHqAZ W1y9GAkQychLyynqQPnnTdM/fUcKBiL1B6bLbZM6YtLe/1AwPtr41AqfM+hJ/iBEMhvO m0bg== MIME-Version: 1.0 X-Received: by 10.107.162.21 with SMTP id l21mr7391142ioe.123.1450481091708; Fri, 18 Dec 2015 15:24:51 -0800 (PST) Received: by 10.36.121.202 with HTTP; Fri, 18 Dec 2015 15:24:51 -0800 (PST) In-Reply-To: <5695944F-A052-4959-8F9A-ACD4CD3413D6@yahoo.com> References: <5695944F-A052-4959-8F9A-ACD4CD3413D6@yahoo.com> Date: Fri, 18 Dec 2015 15:24:51 -0800 Message-ID: Subject: Re: u-boot and ubldr on arm64 From: Adrian Chadd To: Thomas Skibo Cc: "freebsd-arm@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Fri, 18 Dec 2015 23:24:52 -0000 hey cool! Can you post your patches to freebsd and uboot? Let's get them somewhere reviewed! -a On 18 December 2015 at 10:18, Thomas Skibo via freebsd-arm wrote: > > Hello. > > I=E2=80=99ve been taking a stab at getting an arm64 kernel running on qem= u acting as a Zynq Ultrascale evaluation board. The first hurdle was getti= ng the u-boot API and ubldr to compile and run in 64-bit mode. I=E2=80=99v= e managed to get that much to work and wanted to let you know in case this = is interesting and I can share the code. Or, so you can tell me that u-boo= t/ubldr is the wrong approach. > > In any case, here=E2=80=99s how far it boots. The next step is to whip m= y kernel configuration into shape but I may have to put this aside until af= ter the holidays. > > Cheers, > =E2=80=94Thomas > > =E2=80=94 > Thomas Skibo > thomasskibo@yahoo.com > > > Script started on Fri 18 Dec 2015 09:34:49 AM PST > skibo@robleda:~/Projects/Zynq/qemu$ source GO.txt > WARNING: Image format was not specified for '../debug.qemu/SDCARD.img' an= d probing guessed raw. > Automatically detecting the format is dangerous for raw images, = write operations on block 0 will be restricted. > Specify the 'raw' format explicitly to remove the restrictions. > QEMU 2.4.93 monitor - type 'help' for more information > (qemu) c [K > (qemu) > > U-Boot 2015.07-00006-gd3fba7f-dirty (Dec 18 2015 - 09:30:17 -0800) Xilinx= ZynqMP > > I2C: ready > DRAM: 1 GiB > Enabling Caches... > > EL Level: EL1 > NAND: ERROR:arasan_nand_reset timedout > ERROR:arasan_nand_read_buf timedout:Buff RDY > ERROR:arasan_nand_read_buf timedout:Xfer CMPLT > ERROR:arasan_nand_read_buf timedout:Buff RDY > ERROR:arasan_nand_read_buf timedout:Xfer CMPLT > ERROR:arasan_nand_read_buf timedout:Buff RDY > ERROR:arasan_nand_read_buf timedout:Xfer CMPLT > ERROR:arasan_nand_read_buf timedout:Buff RDY > ERROR:arasan_nand_read_buf timedout:Xfer CMPLT > arasan_nand_init: nand_scan_ident failed > NAND init failed > 0 MiB > MMC: zynq_sdhci: 0 > Using default environment > > In: serial > Out: serial > Err: serial > Bootmode: JTAG_MODE > SCSI: SATA link 0 timeout. > AHCI 0001.0000 32 slots 2 ports 1.5 Gbps 0x3 impl SATA mode > flags: ncq only > scanning bus for devices... > Found 0 device(s). > Net: Gem.ff0b0000 > Hit any key to stop autoboot: 5 0 > ZynqMP> fatls mmc 0 > 254704 ubldr > 172 uenv.txt > 160405 demo > 1408 board.dtb > > 4 file(s), 0 dir(s) > > ZynqMP> fatload mmc 0 0x1000000 ubldr > reading ubldr > 254704 bytes read in 72 ms (3.4 MiB/s) > ZynqMP> setenv fdt_file board.dtb > ZynqMP> bootelf 0x1000000 > ## Starting application at 0x010000b0 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @3df02860 > > FreeBSD/aarch64 U-Boot loader, Revision 1.2 > (skibo@ashbury, Fri Dec 18 09:33:17 PST 2015) > > DRAM: 1024MB > Number of U-Boot devices: 2 > U-Boot env: loaderdev not set, will probe all devices. > Found U-Boot device: disk > Probing all disk devices... > Checking unit=3D0 slice=3D partition=3D... good. > Booting from disk0s2a: > | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ |= / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / = - \ | / - \ | /boot/kernel/kernel data=3D0x5ead28+0x2f4620 / - \ | / - \ | = / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / - \ | / -= \ | / syms=3D[0x8+0xc0120- \ | / - \ +0x8+0xbde15| / - \ | / ] > > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel] in 9 seconds... Booting [/boot/kernel/kerne= l] in 8 seconds... Booting [/boot/kernel/kernel] in 7 seconds... > > Type '?' for a list of commands, 'help' for more detailed help. > loader> boot -v > [37m [44mBooting... [m > \ | / - \ | / - \ | /boot/kernel/board.dtb size=3D0x580 > Loaded DTB from file 'board.dtb'. > / - \ | / Kernel entry at 0x0x1201000... > Kernel args: -v > KDB: debugger backends: ddb > KDB: current backend: ddb > No CPU data, limiting to 1 core > 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 #11 r292424M: Fri Dec 18 01:16:09 PST 2015 > skibo@ashbury:/usr/obj/arm64.aarch64/usr/src/sys/EP108 arm64 > FreeBSD clang version 3.7.0 (tags/RELEASE_370/final 246257) 20150906 > WARNING: WITNESS option enabled, expect reduced performance. > Preloaded elf kernel "/boot/kernel/kernel" at 0xffffff8000a61000. > Preloaded dtb "/boot/kernel/board.dtb" at 0xffffff8000a61a28. > CPU(0): ARM Cortex-A53 r0p4 > CPU0 affinity: 0.0.0.0 > FreeBSD/SMP: Multiprocessor System Detected: 1 CPUs > ULE: setup cpu 0 > random: entropy device external interface > null: > openfirm: > mem: > nfslock: pseudo-device > crypto: > random: harvesting attach, 8 bytes (4 bits) from nexus0 > ofwbus0: > simplebus0: on ofwbus0 > random: harvesting attach, 8 bytes (4 bits) from simplebus0 > simplebus1: on ofwbus0 > random: harvesting attach, 8 bytes (4 bits) from simplebus1 > random: harvesting attach, 8 bytes (4 bits) from ofwbus0 > gic0: mem 0xf9010000-0xf901ffff,0xf902= f000-0xf9030fff,0xf9040000-0xf905ffff,0xf906f000-0xf9070fff on simplebus0 > gic0: pn 0x0, arch 0x0, rev 0x0, implementer 0x0 irqs 192 > random: harvesting attach, 8 bytes (4 bits) from gic0 > uart0: mem 0xff000000-0xff000fff irq 53 on simplebus1 > uart0: console (115200,n,8,1) > uart0: fast interrupt > uart0: PPS capture mode 2 (DCD) > random: harvesting attach, 8 bytes (4 bits) from uart0 > uart1: mem 0xff010000-0xff010fff irq 54 on simplebus1 > uart1: fast interrupt > uart1: PPS capture mode 2 (DCD) > random: harvesting attach, 8 bytes (4 bits) from uart1 > simplebus1: mem 0xff0b0000-0xff0b0fff irq 89,89 compa= t cadence,gem (no driver attached) > cryptosoft0: > crypto: assign cryptosoft0 driver id 0, flags 100663296 > crypto: cryptosoft0 registers alg 1 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 2 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 3 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 4 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 5 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 16 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 6 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 7 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 18 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 19 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 20 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 8 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 15 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 9 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 10 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 13 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 14 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 11 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 22 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 23 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 25 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 24 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 26 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 27 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 28 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 21 flags 0 maxoplen 0 > crypto: cryptosoft0 registers alg 17 flags 0 maxoplen 0 > random: harvesting attach, 8 bytes (4 bits) from cryptosoft0 > Device configuration finished. > procfs registered > panic: No usable event timer found! > cpuid =3D 0 > KDB: stack backtrace: > db_trace_self() at db_trace_self_wrapper+0x28 > pc =3D 0xffffff80004460b4 lr =3D 0xffffff800004eaf8 > sp =3D 0xffffff800000b8e0 fp =3D 0xffffff800000ba00 > > db_trace_self_wrapper() at vpanic+0x170 > pc =3D 0xffffff800004eaf8 lr =3D 0xffffff80001c9088 > sp =3D 0xffffff800000ba10 fp =3D 0xffffff800000ba90 > > vpanic() at panic+0x4c > pc =3D 0xffffff80001c9088 lr =3D 0xffffff80001c9118 > sp =3D 0xffffff800000baa0 fp =3D 0xffffff800000bb20 > > panic() at cpu_initclocks_bsp+0x3b4 > pc =3D 0xffffff80001c9118 lr =3D 0xffffff800045bff8 > sp =3D 0xffffff800000bb30 fp =3D 0xffffff800000bb80 > > cpu_initclocks_bsp() at initclocks+0x28 > pc =3D 0xffffff800045bff8 lr =3D 0xffffff8000171994 > sp =3D 0xffffff800000bb90 fp =3D 0xffffff800000bb90 > > initclocks() at mi_startup+0x11c > pc =3D 0xffffff8000171994 lr =3D 0xffffff800016ea90 > sp =3D 0xffffff800000bba0 fp =3D 0xffffff800000bbd0 > > mi_startup() at virtdone+0x5c > pc =3D 0xffffff800016ea90 lr =3D 0xffffff800000108c > sp =3D 0xffffff800000bbe0 fp =3D 0x0000000000000000 > > KDB: enter: panic > [ thread pid 0 tid 100000 ] > Stopped at kdb_enter+0x40: > db> > > _______________________________________________ > freebsd-arm@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org"