FreeBSD 12 regression: unable to boot in UEFI/bhyve: blank screen after loader

From: Subbsd <subbsd_at_gmail.com>
Date: Fri, 14 Sep 2018 21:32:53 +0300
The problem started before FreeBSD 12 ALPHA1  but still exist in ALPHA6.

If you try to run FreeBSD 12  (e.g.
FreeBSD-12.0-ALPHA6-amd64-20180914-r338675-disc1.iso from
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/12.0/
) in bhyve UEFI mode with command from handbook
(https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization-host-bhyve.html)
in chapter "21.7.5. Graphical UEFI Framebuffer for bhyve Guests" you
will see a black screen after loader:

https://pasteboard.co/HDSVqEE.png

Apparently, this is due to recent changes in the [lua]loader.

How to reproduce:

1) fetch -o /tmp/FreeBSD-12.0-ALPHA6-amd64-20180914-r338675-disc1.iso
ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/amd64/amd64/ISO-IMAGES/12.0/FreeBSD-12.0-ALPHA6-amd64-20180914-r338675-disc1.iso

2) truncate -s1g /tmp/guest.img

3) ifconfig tap1 create

4) kldload vmm

5) pkg install -y  uefi-edk2-bhyve

6) bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc \
-s 2:0,virtio-net,tap1 -s 3:0,virtio-blk,/tmp/guest.img \
-s 4:0,ahci-cd,/tmp/FreeBSD-12.0-ALPHA6-amd64-20180914-r338675-disc1.iso
-c 4 -m 1024M \
-s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \

7) vncviewer :5900
Received on Fri Sep 14 2018 - 16:32:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC