summaryrefslogtreecommitdiffstats
path: root/share/examples
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2013-10-30 20:42:09 +0000
committerneel <neel@FreeBSD.org>2013-10-30 20:42:09 +0000
commit249db5aac359e977e2e92a1e27132c9d3037f3dd (patch)
treef6b4a2154fde4216c91863cf56f0b0053acd592f /share/examples
parent9a9c7f1310dd0c292ea36a425791d1f18b4644db (diff)
downloadFreeBSD-src-249db5aac359e977e2e92a1e27132c9d3037f3dd.zip
FreeBSD-src-249db5aac359e977e2e92a1e27132c9d3037f3dd.tar.gz
MFC r257293.
Add support for PCI-to-ISA LPC bridge emulation. If the LPC bus is attached to a virtual machine then we implicitly create COM1 and COM2 ISA devices. Prior to this change the only way of attaching a COM port to the virtual machine was by presenting it as a PCI device that is mapped at the legacy I/O address 0x3F8 or 0x2F8. There were some issues with the original approach: - It did not work at all with UEFI because UEFI will reprogram the PCI device BARs and remap the COM1/COM2 ports at non-legacy addresses. - OpenBSD GENERIC kernel does not create a /dev/console because it expects the uart device at the legacy 0x3F8/0x2F8 address to be an ISA device. - It was functional with a FreeBSD guest but caused the console to appear on /dev/ttyu2 which was not intuitive. The uart emulation is now independent of the bus on which it resides. Thus it is possible to have uart devices on the PCI bus in addition to the legacy COM1/COM2 devices behind the LPC bus. The command line option to attach ISA COM1/COM2 ports to a virtual machine is "-s <bus>,lpc -l com1,stdio". The command line option to create a PCI-attached uart device is: "-s <bus>,uart[,stdio]" The command line option to create PCI-attached COM1/COM2 device is: "-S <bus>,uart[,stdio]". This style of creating COM ports is deprecated. Approved by: re (glebius)
Diffstat (limited to 'share/examples')
-rwxr-xr-xshare/examples/bhyve/vmrun.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/share/examples/bhyve/vmrun.sh b/share/examples/bhyve/vmrun.sh
index 2e1bb38..6134915 100755
--- a/share/examples/bhyve/vmrun.sh
+++ b/share/examples/bhyve/vmrun.sh
@@ -157,7 +157,7 @@ while [ 1 ]; do
exit 1
fi
BOOTDISK=${isofile}
- installer_opt="-s 3:0,virtio-blk,${BOOTDISK}"
+ installer_opt="-s 31:0,virtio-blk,${BOOTDISK}"
else
BOOTDISK=${virtio_diskdev}
installer_opt=""
@@ -171,10 +171,11 @@ while [ 1 ]; do
${FBSDRUN} -c ${cpus} -m ${memsize} ${apic_opt} -AI -H -P \
-g ${gdbport} \
-s 0:0,hostbridge \
- -s 1:0,virtio-net,${tapdev} \
- -s 2:0,virtio-blk,${virtio_diskdev} \
+ -s 1:0,lpc \
+ -s 2:0,virtio-net,${tapdev} \
+ -s 3:0,virtio-blk,${virtio_diskdev} \
+ -l com1,stdio \
${installer_opt} \
- -S 31,uart,stdio \
${vmname}
if [ $? -ne 0 ]; then
break
OpenPOWER on IntegriCloud