From owner-freebsd-arm@freebsd.org Sun Jan 8 19:40:32 2017 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 63803CA5A2C for ; Sun, 8 Jan 2017 19:40:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: from mail-oi0-x22d.google.com (mail-oi0-x22d.google.com [IPv6:2607:f8b0:4003:c06::22d]) (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 2561A1B09 for ; Sun, 8 Jan 2017 19:40:32 +0000 (UTC) (envelope-from jason.harmening@gmail.com) Received: by mail-oi0-x22d.google.com with SMTP id 3so487013076oih.1 for ; Sun, 08 Jan 2017 11:40:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HLo9Y3wwIdUXKk4nQ1VBGgRlS4tzG3dKenjGrktqqrw=; b=oGuP3rKryskuuqerPzGCGq3zNQneiJvm8MC9tvXbsLw+eN1D3GWFQRBzriJoeh9+El KoufiizA2PeI1GEdbGkaHKDaU8s6MgDPd3I66DILfnxQ1VAjMIgphDjSK+3Op/lD0gOY lQYGvbhevYaIG/8v6Qc1AREa2S5LGdI7BzYfYqzhUzms0ik/3bj8DeDamTfYwwrHgWjp FqyugkSDuFpzrEhQcKvy+z+UiYWXNy9blGf3oz3Zeu4C94uM4NKiphO8dhQMjzLzpnpO ZboluiIZT6cErcbap8hq0FbxnWrCxHx6lQGAKtxLV76lTj+dg/riHhMrDjTgy1ynnFBm k3AQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HLo9Y3wwIdUXKk4nQ1VBGgRlS4tzG3dKenjGrktqqrw=; b=dHCVlkpq/MbDsBWemufpeszfQfqmdZGqQ7mUGaDZkWSfuOMrZhZ9DTYI1xzmwiBRZ9 ZvoAddTMmGCRCgqU0xb9mlJr3uRXqTf3u0WdKi0K7tSEyeFt07GZiO1XgxlyV8rlWe9E eEmt0GQw51eN11O/L/JkZTROgtC3bwIYwp97sAKIzvsKN8ksp2ckNSEX5wn0fUwA7Rk5 0ZN6Fl2fK1P058FYV5tKJuD6q4P1AAZkuKOaBYXTgebl+GyfVFkLJTVPo5eio9/0YRst hFqx95MeXUL608fxvP8FNtpF8BAsXhnGNfWDfResUcOxODd1kcnm31ZCLmHInWhrdpNJ bhtg== X-Gm-Message-State: AIkVDXLFcDBR14rbOHHp1wT0onhCugAGmFkfQIOxG4yeadxBfG+1LfB6lPzaf4K+7xarj9OcY8bC7C5jbNqQ4Q== X-Received: by 10.157.63.162 with SMTP id r31mr6194736otc.39.1483904431182; Sun, 08 Jan 2017 11:40:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.7.72 with HTTP; Sun, 8 Jan 2017 11:40:30 -0800 (PST) In-Reply-To: <5124EA24-BD02-41CA-87ED-DFB5732685E1@bluezbox.com> References: <58C0D791-3D3C-4DE2-9EAF-93DA40ED620D@bluezbox.com> <272ABF9C-4735-44C4-8EB8-FBCCDE37785A@bluezbox.com> <7950ED7A-4A64-4A88-A0DA-8A0D6E54D6B8@fh-muenster.de> <5124EA24-BD02-41CA-87ED-DFB5732685E1@bluezbox.com> From: Jason Harmening Date: Sun, 8 Jan 2017 14:40:30 -0500 Message-ID: Subject: Re: loading 'VIRT' kernel in qemu To: Oleksandr Tymoshenko Cc: Michael Tuexen , freebsd-arm@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Jan 2017 19:40:32 -0000 On Fri, Dec 30, 2016 at 12:52 PM, Oleksandr Tymoshenko wrote: > > On Dec 30, 2016, at 2:55 AM, Michael Tuexen wrote= : > > On 30 Dec 2016, at 09:14, Oleksandr Tymoshenko wrote= : > > > On Dec 29, 2016, at 5:25 PM, Oleksandr Tymoshenko > wrote: > > > On Dec 29, 2016, at 5:12 AM, Jason Harmening > wrote: > > > .. skipped .. > > > Ah, thanks! That should make things a good deal easier. > Using the nanobsd-generated images and the qemu invocation from > qemu-armv7.cfg, I get a bit further but end up with a repeating prefetch > abort: > Prefetch Abort Exception PC at 0xFF176790 CPSR 0x80000113 > > This is either in UEFI or very early in kernel bootstrap, since the > copyright hasn't printed yet...haven't poked at it to figure out where th= e > pc comes from yet. > > > Looks like it's boot1.efi. After upgrading to clang 3.9.0 -fPIC is > required to build loader. In addition to this problem there seems to be > some error when calculating value for relocation. Looks like it=E2=80=99s= going to > take a bit of time to track down, I can=E2=80=99t identify it immediately= . > > > > Hi Jason, > > I think I fixed the PIC problem along with FDT-related one: > https://people.freebsd.org/~gonzo/arm/patches/arm-uefi.diff > > Any plan to get this into head? > > > Yes, I=E2=80=99ll submit this patch to Phabricator and it=E2=80=99ll be c= ommitted to > HEAD when/if it passes the review. > To close the loop (sorry, I was traveling for the last week & couldn't test until now): applying this patch & passing -m 256M fixes things and I can boot reliably. Thanks for all your help!