Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2017 17:10:10 +0300
From:      Mihai Carabas <mihai.carabas@gmail.com>
To:        Andrew Turner <andrew@fubar.geek.nz>
Cc:        Alexandru Elisei <alexandru.elisei@gmail.com>, freebsd-arm@freebsd.org
Subject:   Re: bhyve on ARMv8 - initarm() and struct arm64_bootparams
Message-ID:  <CANg1yUtbF-U0R6ipuxq20LXdW9GmjXE%2BBi0uxxzEodJDsS09%2BA@mail.gmail.com>
In-Reply-To: <2D2A9368-489D-44AC-9CAA-2292025EA8F1@fubar.geek.nz>
References:  <CAB-4s4k5ivqRjwXaUtjS0EPf6qF-5PvBCkYOigjgatU0y5i=fQ@mail.gmail.com> <2D2A9368-489D-44AC-9CAA-2292025EA8F1@fubar.geek.nz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 8, 2017 at 4:50 PM, Andrew Turner <andrew@fubar.geek.nz> wrote:

>
> > On 7 Oct 2017, at 07:50, Alexandru Elisei <alexandru.elisei@gmail.com>
> 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/ <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"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANg1yUtbF-U0R6ipuxq20LXdW9GmjXE%2BBi0uxxzEodJDsS09%2BA>