aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bhyve/bhyve.8
diff options
context:
space:
mode:
authorRebecca Cran <bcran@FreeBSD.org>2021-11-28 16:34:33 +0000
committerRebecca Cran <bcran@FreeBSD.org>2021-12-12 15:07:27 +0000
commit866036f46c6e8884cc7a2aa029408366ede40a23 (patch)
treee485f04a76d7072ff097865f754ec94a67b710ee /usr.sbin/bhyve/bhyve.8
parentbf839416381cb9f63a8a82ea6e897a22830a8009 (diff)
downloadsrc-866036f46c6e8884cc7a2aa029408366ede40a23.tar.gz
src-866036f46c6e8884cc7a2aa029408366ede40a23.zip
bhyve: Support a _VARS.fd file for bootrom
OVMF creates two separate .fd files, a _CODE.fd file containing the UEFI code, and a _VARS.fd file containing a template of an empty UEFI variable store. OVMF decides to write variables to the memory range just below the boot rom code if it detects a CFI flash device. So here we add just the barest facsimile of CFI command handling to bootrom.c that is needed to placate OVMF. Submitted by: D Scott Phillips <d.scott.phillips@intel.com> Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D19976 MFC After: 1 week
Diffstat (limited to 'usr.sbin/bhyve/bhyve.8')
-rw-r--r--usr.sbin/bhyve/bhyve.823
1 files changed, 21 insertions, 2 deletions
diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8
index 3b7bf6b65467..fe4eb3ffaaeb 100644
--- a/usr.sbin/bhyve/bhyve.8
+++ b/usr.sbin/bhyve/bhyve.8
@@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd October 13, 2021
+.Dd November 28, 2021
.Dt BHYVE 8
.Os
.Sh NAME
@@ -500,10 +500,15 @@ Use the host TTY device for serial port I/O.
.Pp
Boot ROM device backends:
.Bl -tag -width 10n
-.It Ar romfile
+.It Ar romfile Ns Op Cm \&, Ns Ar varfile
Map
.Ar romfile
in the guest address space reserved for boot firmware.
+If
+.Ar varfile
+is provided, that file is also mapped in the boot firmware guest
+address space, and any modifications the guest makes will be saved
+to that file.
.El
.Pp
Pass-through device backends:
@@ -916,6 +921,20 @@ bhyve -c 2 -m 4G -w -H \\
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\
uefivm
.Ed
+.Pp
+Run a UEFI virtual machine with a VARS file to save EFI variables.
+Note that
+.Nm
+will write guest modifications to the given VARS file.
+Be sure to create a per-guest copy of the template VARS file from
+.Pa /usr .
+.Bd -literal -offset indent
+bhyve -c 2 -m 4g -w -H \\
+ -s 0,hostbridge \\
+ -s 31,lpc -p com1,stdio \\
+ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd,BHYVE_UEFI_VARS.fd
+ uefivm
+.Ed
.Sh SEE ALSO
.Xr bhyve 4 ,
.Xr netgraph 4 ,