freebsd-nq/share/examples
Neel Natu ea7f1c8cd2 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.

Discussed with:	grehan
Reviewed by:	grehan
Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

M    share/examples/bhyve/vmrun.sh
AM   usr.sbin/bhyve/legacy_irq.c
AM   usr.sbin/bhyve/legacy_irq.h
M    usr.sbin/bhyve/Makefile
AM   usr.sbin/bhyve/uart_emul.c
M    usr.sbin/bhyve/bhyverun.c
AM   usr.sbin/bhyve/uart_emul.h
M    usr.sbin/bhyve/pci_uart.c
M    usr.sbin/bhyve/pci_emul.c
M    usr.sbin/bhyve/inout.c
M    usr.sbin/bhyve/pci_emul.h
M    usr.sbin/bhyve/inout.h
AM   usr.sbin/bhyve/pci_lpc.c
AM   usr.sbin/bhyve/pci_lpc.h
2013-10-29 00:18:11 +00:00
..
autofs/driver Always assign WARNS using ?= 2010-03-02 16:58:04 +00:00
bhyve Add support for PCI-to-ISA LPC bridge emulation. If the LPC bus is attached 2013-10-29 00:18:11 +00:00
bootforth
BSD_daemon Add an alternate version of beastie to the examples directory. 2013-04-28 02:23:39 +00:00
csh Add a bunch more example completions. 2012-10-16 02:52:30 +00:00
cvsup Ports are no more exported via cvsup, remove cvsup examples and documentation refering to ports 2013-03-11 10:48:26 +00:00
diskless Correct double "the the" 2012-09-14 21:28:56 +00:00
drivers Update to use DEVMETHOD_END. 2011-11-22 21:49:29 +00:00
etc - Trim an unused and bogus Makefile for mount_smbfs. 2013-06-28 21:00:08 +00:00
find_interface
FreeBSD_version
hast Please welcome HAST - Highly Avalable Storage. 2010-02-18 23:16:19 +00:00
hwpmc
ibcs2
indent indent.pro example: put all options one per line 2010-04-05 09:26:03 +00:00
ipfilter
ipfw
IPv6
jails Add two scripts that demonstrate how to make and 2010-10-24 22:59:38 +00:00
kld Snapshot. This passes the build test, but has not yet been finished or debugged. 2013-10-04 06:55:06 +00:00
libusb20 Add some examples about how to use FreeBSD's libusb20 in your own 2012-07-18 21:30:17 +00:00
libvgl Remove typos, tabs-after-spaces and EOL whitespace. Convert to UTF-8. 2011-05-22 14:03:21 +00:00
mdoc Sync example file with mdoc changes made in rev 235450. 2012-06-13 19:08:00 +00:00
netgraph Fix more typos to be a good example. 2011-05-22 14:23:48 +00:00
perfmon Revert r253748,253749 2013-07-28 18:44:17 +00:00
pf Add the 'inet' keyword after the nat rule to avoid interfering with 2012-06-28 03:30:17 +00:00
ppi Fxi a bunch of typos. 2013-05-10 16:41:26 +00:00
ppp A number of places in the source tree still reference cuad.* after 2012-12-08 22:16:36 +00:00
printing X11BASE has been deprecated for a long time and will die soon 2012-01-09 00:48:19 +00:00
scsi_target Bring legacy CAM target implementation back into API/KPI-coherent and even 2013-09-01 13:01:59 +00:00
ses Decode common state bits in getencstat output. 2012-11-06 01:29:26 +00:00
smbfs
sunrpc
witness
Makefile Remove most of the ATF tools and the _atf user. 2013-10-12 06:06:53 +00:00