From owner-freebsd-arm@freebsd.org Fri Dec 18 18:18:39 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 7AFC7A49EFC for ; Fri, 18 Dec 2015 18:18:39 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) Received: from nm7.bullet.mail.bf1.yahoo.com (nm7.bullet.mail.bf1.yahoo.com [98.139.212.166]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4609114E3 for ; Fri, 18 Dec 2015 18:18:38 +0000 (UTC) (envelope-from thomasskibo@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1450462711; bh=UEgKf0u9cqzK4qEybSc2dP1jNw5Evzgg42iVlpw+Cu0=; h=From:Subject:Date:Cc:To:From:Subject; b=t9L/xzgp+/+ZjriRo8yQ7Z1oOcs2WcnsM7X95dQHddQ+L/RS3mA+2HFIvwvXp0/G3wPtVI2KWIamOlvaNWY/BxPF3bWMujFlNH6jIkAvu0zwtKBUPv++3ExnOHtXWzrR3ONc9zzQvY4x+ENwTP0xa3UJ4udxQAhpwzp4unkKr6MvpINyLYn6ty2fq0yPNuf/ZcBVQuaQgc6LSvMUYkTcMu+jQ6CuKdmVt1EdZAjoHn0I11eWwqSIrYqo02SUM8Bmti5mNBKuhZDHKvkIvVx38jQIV2+HCZMi8adTQPfWNib9XPmMgtOg0urB8uMkGPCoXfWFEx13X7HkvSgozUXzKQ== Received: from [98.139.215.143] by nm7.bullet.mail.bf1.yahoo.com with NNFMP; 18 Dec 2015 18:18:31 -0000 Received: from [98.139.211.207] by tm14.bullet.mail.bf1.yahoo.com with NNFMP; 18 Dec 2015 18:18:31 -0000 Received: from [127.0.0.1] by smtp216.mail.bf1.yahoo.com with NNFMP; 18 Dec 2015 18:18:31 -0000 X-Yahoo-Newman-Id: 950016.42354.bm@smtp216.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: tpegt6IVM1k6BRel9H9GpP3eIkruuQK3mq6._rWCvcUKDbZ jZFycyHJgiiAhaAYdD68Dm9NGzEXTKA4XgEUGvCcUGBuhFiY2BgTKXLwaVNz soonyBzk9jWDtY3Kir61qnH4KJtJjWawrwi.9gqHie52EjfVpnKlUCQwoN8s a2LESxWrv54KjXbZUbeBwZcodWR3Y_IicQcIkLoYkESFR6QXdpKXZ8zFrfN. vwEbZwxQjW7FQGhgrlaxK9Sska5xqElcbPm1Vb.MRjNIKl0mk2BKXmQU37YT 8Y7.f.oNTQ0M5PqjgzF79.VEmQI7BqLhVO0M0l6et6PTnD1tW5uB0aIjUlFY CQeMeBGnHu7XRMD4qf5Mk4WaxDsErui97bnjLCa2ptbB5gwn16msgnCNxNur NY1a6WaQ_o6vcr0EOA4Kbw7J.oQtoODqtMPtTunLvi4r_HSG_gbzEqzetIO3 Lwfgie_VdQEGeXTSfrRFG7AR7ix5cBlqahO_hBlDVBsBJipoAhCkd4bE6HG6 pV0mvTlZXMMK.TUQ11FMyn69m0Co.VhMVvL74 X-Yahoo-SMTP: .8Dytk6swBAeTUTcf.ezO8BKaYfn.mUV From: Thomas Skibo Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: u-boot and ubldr on arm64 Date: Fri, 18 Dec 2015 10:18:30 -0800 Message-Id: <5695944F-A052-4959-8F9A-ACD4CD3413D6@yahoo.com> Cc: Thomas Skibo To: freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) X-Mailer: Apple Mail (2.3112) 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 18:18:39 -0000 Hello. I=E2=80=99ve been taking a stab at getting an arm64 kernel running on = qemu acting as a Zynq Ultrascale evaluation board. The first hurdle was = getting the u-boot API and ubldr to compile and run in 64-bit mode. = I=E2=80=99ve 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-boot/ubldr is the wrong approach. In any case, here=E2=80=99s how far it boots. The next step is to whip = my kernel configuration into shape but I may have to put this aside = until after 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=20 WARNING: Image format was not specified for '../debug.qemu/SDCARD.img' = and 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=1B[K (qemu)=20 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=20 scanning bus for devices... Found 0 device(s). Net: Gem.ff0b0000 Hit any key to stop autoboot: 5 =08=08=08 0=20 ZynqMP> fatls mmc 0 254704 ubldr=20 172 uenv.txt=20 160405 demo=20 1408 board.dtb=20 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 =20 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: = |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08= \=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08= -=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08= /=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08= |=08/=08-=08\=08|=08/boot/kernel/kernel data=3D0x5ead28+0x2f4620 = /=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08= |=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08-=08= \=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/=08syms=3D[0x8+0xc0120-=08\=08|=08= /=08-=08\=08+0x8+0xbde15|=08/=08-=08\=08|=08/=08] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel] in 9 seconds... Booting = [/boot/kernel/kernel] in 8 seconds... Booting [/boot/kernel/kernel] in 7 = seconds...=20 Type '?' for a list of commands, 'help' for more detailed help. loader> boot -v =1B[37m=1B[44mBooting...=1B[m \=08|=08/=08-=08\=08|=08/=08-=08\=08|=08/boot/kernel/board.dtb = size=3D0x580 Loaded DTB from file 'board.dtb'. /=08-=08\=08|=08/=08Kernel 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,0xf902f000-0xf9030fff,0xf9040000-0xf905ffff,0xf906f0= 00-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 = compat 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>=20