Lines Matching +full:aac +full:- +full:mode

3 # SPDX-License-Identifier: BSD-2-Clause
40 DEFAULT_NIC=virtio-net
41 DEFAULT_DISK=virtio-blk
56 echo "Usage: vmrun.sh [-aAEhiTuvw] [-c <CPUs>] [-C <console>]" \
57 "[-d <disk file>]"
58 echo " [-e <name=value>] [-f <path of firmware>]" \
59 "[-F <size>]"
60 echo " [-G [w][address:]port] [-H <directory>]"
61 echo " [-I <location of installation iso>] [-l <loader>]"
62 echo " [-L <VNC IP for UEFI framebuffer>]"
63 echo " [-m <memsize>]" \
64 "[-n <network adapter emulation type>]"
65 echo " [-p <pcidev|bus/slot/func>]"
66 echo " [-P <port>] [-t <tapdev>] <vmname>"
68 echo " -h: display this help message"
69 echo " -a: force memory mapped local APIC access"
70 echo " -A: use AHCI disk emulation instead of ${DEFAULT_DISK}"
71 echo " -c: number of virtual cpus (default: ${DEFAULT_CPUS})"
72 echo " -C: console device (default: ${DEFAULT_CONSOLE})"
73 echo " -d: virtio diskdev file (default: ${DEFAULT_VIRTIO_DISK})"
74 echo " -e: set FreeBSD loader environment variable"
75 echo " -E: Use UEFI mode (amd64 only)"
76 echo " -f: Use a specific boot firmware (e.g., EDK2, U-Boot)"
77 echo " -F: Use a custom UEFI GOP framebuffer size" \
79 echo " -G: bind the GDB stub to the specified address"
80 echo " -H: host filesystem to export to the loader"
81 echo " -i: force boot of the Installation CDROM image"
82 echo " -I: Installation CDROM image location" \
84 echo " -l: the OS loader to use (default: /boot/userboot.so) (amd64 only)"
85 echo " -L: IP address for UEFI GOP VNC server" \
87 echo " -m: memory size (default: ${DEFAULT_MEMSIZE})"
88 echo " -n: network adapter emulation type" \
90 echo " -p: pass-through a host PCI device (e.g ppt0 or" \
92 echo " -P: UEFI GOP VNC port (default: ${DEFAULT_VNCPORT})"
93 echo " -t: tap device for virtio-net (default: $DEFAULT_TAPDEV)"
94 echo " -T: Enable tablet device (for UEFI GOP) (amd64 only)"
95 echo " -u: RTC keeps UTC time"
96 echo " -v: Wait for VNC client connection before booting VM"
97 echo " -w: ignore unimplemented MSRs (amd64 only)"
99 [ -n "$msg" ] && errmsg "$msg"
103 if [ `id -u` -ne 0 ]; then
108 kldstat -n vmm > /dev/null 2>&1
109 if [ $? -ne 0 ]; then
114 platform=$(uname -m)
115 if [ "${platform}" != amd64 -a "${platform}" != arm64 ]; then
132 # EFI-specific options
134 efi_firmware="/usr/local/share/uefi-firmware/BHYVE_UEFI.fd"
142 uboot_firmware="/usr/local/share/u-boot/u-boot-bhyve-arm64/u-boot.bin"
146 bhyverun_opt="-H -P"
147 opts="aAc:C:d:e:Ef:F:G:hH:iI:l:L:m:n:p:P:t:Tuvw"
151 opts="aAc:C:d:e:f:F:G:hH:iI:L:m:n:P:t:uv"
158 bhyverun_opt="${bhyverun_opt} -a"
161 disk_emulation="ahci-hd"
177 loader_opt="${loader_opt} -e ${OPTARG}"
189 bhyverun_opt="${bhyverun_opt} -G ${OPTARG}"
201 loader_opt="${loader_opt} -l ${OPTARG}"
224 tablet="-s 30,xhci,tablet"
227 bhyverun_opt="${bhyverun_opt} -u"
233 bhyverun_opt="${bhyverun_opt} -w"
241 if [ $tap_total -eq 0 ] ; then
245 if [ $disk_total -eq 0 ] ; then
251 shift $((${OPTIND} - 1))
253 if [ $# -ne 1 ]; then
258 if [ -n "${host_base}" ]; then
259 loader_opt="${loader_opt} -h ${host_base}"
263 if [ ${pass_total} -gt 0 ]; then
264 loader_opt="${loader_opt} -S"
265 bhyverun_opt="${bhyverun_opt} -S"
268 if [ -z "$firmware" ]; then
272 firmware_pkg="edk2-bhyve"
276 firmware_pkg="u-boot-bhyve-arm64"
281 if [ -n "${firmware}" -a ! -f "${firmware}" ]; then
283 if [ -n "${firmware_pkg}" ]; then
293 if [ ! -e ${virtio_diskdev} ]; then
296 truncate -s 8G ${virtio_diskdev} > /dev/null
299 if [ ! -r ${virtio_diskdev} ]; then
304 if [ ! -w ${virtio_diskdev} ]; then
314 ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1
318 file -s ${first_diskdev} | grep "boot sector" > /dev/null
320 if [ $rc -ne 0 ]; then
321 file -s ${first_diskdev} | \
325 if [ $rc -ne 0 ]; then
331 if [ $force_install -eq 1 -o $need_install -eq 1 ]; then
332 if [ ! -r ${isofile} ]; then
333 echo -n "Installation CDROM image \"${isofile}\" "
337 BOOTDISKS="-d ${isofile}"
338 installer_opt="-s 31:0,ahci-cd,${isofile}"
342 while [ $i -lt $disk_total ] ; do
344 if [ -r ${disk} ] ; then
345 BOOTDISKS="$BOOTDISKS -d ${disk} "
352 if [ ${platform} = amd64 -a ${efi_mode} -eq 0 ]; then
353 ${LOADER} -c ${console} -m ${memsize} ${BOOTDISKS} \
356 if [ $bhyve_exit -ne 0 ]; then
364 devargs="-s 0:0,hostbridge" # accumulate disk/tap args here
367 console_opt="-l com1,${console}"
368 devargs="$devargs -s 1:0,lpc "
372 console_opt="-o console=${console}"
373 devargs="$devargs -o bootrom=${firmware} "
379 while [ $i -lt $disk_total ] ; do
383 devargs="$devargs -s $nextslot:0,$disk_emulation,${disk}${opts} "
389 while [ $i -lt $tap_total ] ; do
391 devargs="$devargs -s $nextslot:0,${nic},${tapname} "
397 while [ $i -lt $pass_total ] ; do
399 bsfform="$(echo "${pass}" | grep "^[0-9]\+/[0-9]\+/[0-9]\+$")"
400 if [ -z "${bsfform}" ]; then
401 bsf="$(pciconf -l "${pass}" 2>/dev/null)"
402 if [ $? -ne 0 ]; then
406 bsf="$(echo "${bsf}" | awk -F: '{print $2"/"$3"/"$4}')"
410 devargs="$devargs -s $nextslot:0,passthru,${bsf} "
416 if [ ${efi_mode} -gt 0 ]; then
417 efiargs="-s 29,fbuf,tcp=${vnchost}:${vncport},"
419 efiargs="${efiargs} -l bootrom,${firmware}"
423 ${FBSDRUN} -c ${cpus} -m ${memsize} ${bhyverun_opt} \
432 # 0 - VM has been reset
433 # 1 - VM has been powered off
434 # 2 - VM has been halted
435 # 3 - VM generated a triple fault
436 # all other non-zero status codes are errors
438 if [ $bhyve_exit -ne 0 ]; then
448 ${BHYVECTL} --vm=${vmname} --destroy > /dev/null 2>&1