bhyve on ARMv8 - initarm() and struct arm64_bootparams

Mihai Carabas mihai.carabas at gmail.com
Sun Oct 8 14:10:14 UTC 2017


On Sun, Oct 8, 2017 at 4:50 PM, Andrew Turner <andrew at fubar.geek.nz> wrote:

>
> > On 7 Oct 2017, at 07:50, Alexandru Elisei <alexandru.elisei at 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 last
> module, and add on its size, then add on space for the environment and dtb.
>
> 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’s based on an old code base. Alternatively 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 at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arm
> To unsubscribe, send any mail to "freebsd-arm-unsubscribe at freebsd.org"
>


More information about the freebsd-arm mailing list