From owner-freebsd-arm@freebsd.org Sun Oct 8 14:10:14 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 4388BE36BA5 for ; Sun, 8 Oct 2017 14:10:14 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 69417719D4 for ; Sun, 8 Oct 2017 14:10:13 +0000 (UTC) (envelope-from mihai.carabas@gmail.com) Received: by mail-wm0-x22b.google.com with SMTP id u138so16481733wmu.5 for ; Sun, 08 Oct 2017 07:10:13 -0700 (PDT) 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=M+1HosQSdbIul3ITjQul23R3RE6+nHABjEjizODx4qs=; b=XmkwQwhvFHMQOVRonYWE6jiqz65Y2yiv4mr0RJ5AfBSHl6PXAkayJPYMk8h6oyc+ha eEoqqw/jQnMs58RQGsRRu9F+fFbzaZDFXI925BdRbRMlamPcU5vHKt0B36JDfl2CrUK/ dfT2AZttz7xno1GM/8bA53etUp72+3d2iYSdJBzcRd2yv8IPUrPXSEOU+YgRJ28tkcWg UAE9k3x6ikdrA97h7XgqeYwaEj0gaqlNiSNIC2rUNPvHe74wlSucB7FA8m1mgzOABLQc 2/s/KeV8zCRSXEX4JDym0TARLJDAlZt37weTKtTn7Qv592F7UvFLlNFu7CgPmR2bGosz uTPg== 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=M+1HosQSdbIul3ITjQul23R3RE6+nHABjEjizODx4qs=; b=Tt2xyX+TzQmgqLIW7R2aZDEgAiuFWeF+q3HCjsfWUvKB19V5y0XLumbjTRtZwOcw18 SZyVQt5ZeSZxSkBRf7rywUqRU5fpGWz8dfKQG8wOJE4NBGUqg5afxCkd/3wocWPRlGf9 rKe2eDhbQNbTzA7LxRyKV3jgiLgvABrI1cGfpwyCK/oM+EuoAfFYrBcWfnsLAhrrm4TR URTuuSEXRz/u7fJF5SsNaL9/frSgBSrl4Nv5FVuUkafwzm0LnosYjIBkaLzpuFZyHmtn K1QojK/Lbcq+w23qd+O/dKldFdEUWxWt9GHhvzo+n4cG+a0Vsj4cVfi+tlsWUvcfqSlZ Hc9w== X-Gm-Message-State: AMCzsaWfNRy/oaJfb9LFyHiz4qE/F8eL+UnOtBcvsbDm2t1HwQGFTyjg UzXc9QcnuHLt3LKg0SfRtD2gV8dek16WJvHGZDE= X-Google-Smtp-Source: AOwi7QBkx1K22XrDGmtXo1bDOAgbacrhn8dLqzb9R3chrxzbd/mcUbqz3WvU9jweLmCSUT2LepQ7Jo6WiLbC2JGsOM0= X-Received: by 10.223.171.69 with SMTP id r5mr6903069wrc.112.1507471811739; Sun, 08 Oct 2017 07:10:11 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.228.132 with HTTP; Sun, 8 Oct 2017 07:10:10 -0700 (PDT) In-Reply-To: <2D2A9368-489D-44AC-9CAA-2292025EA8F1@fubar.geek.nz> References: <2D2A9368-489D-44AC-9CAA-2292025EA8F1@fubar.geek.nz> From: Mihai Carabas Date: Sun, 8 Oct 2017 17:10:10 +0300 Message-ID: Subject: Re: bhyve on ARMv8 - initarm() and struct arm64_bootparams To: Andrew Turner Cc: Alexandru Elisei , 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 Oct 2017 14:10:14 -0000 On Sun, Oct 8, 2017 at 4:50 PM, Andrew Turner wrote: > > > On 7 Oct 2017, at 07:50, Alexandru Elisei > wrote: > > > > Hello, > > > > I am currently working on porting bhyve to ARMv8 and I've managed to > > start a guest kernel inside bhyve. > > > > I am having trouble getting past the initarm() function in the guest > > and I think the problem is the fact that I am not sending the correct > > boot parameter arm64_bootparams->modulep to the guest (the other > > struct variables are computed in locore.S before calling initarm()). > > > > As far as I can I can tell modulep is a pointer to the mapped kernel > > image virtual address where module information is stored, but I don't > > know how to get that information from the guest kernel when creating > > the virtual machine. > > > > Can anyone provide some help with this issue? > > It should be the virtual address the module data has been loaded into. In > loader.efi we handle this by searching for the virtual address of the las= t > module, and add on its size, then add on space for the environment and dt= b. > > I would strongly suggest you use UEFI boot. It would fix this, and allow > non-FreeBSD operating systems to also boot. There is an existing port of > EDK2 to bhyve, however it=E2=80=99s based on an old code base. Alternativ= ely u-boot > now supports the required EFI parts. There are a few extra patches for > FreeBSD in the repo at [1]. > > At this point we use old bhyveload executable to load the guest into memory. For booting with EFI a VM requires additional work. May be we can dump bhyveload and use UEFI from x86: https://wiki.freebsd.org/bhyve/UEFI ? It is much different from ARM? Mihai > Andrew > > [1] https://github.com/freebsd/u-boot/ > > _______________________________________________ > 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" >