Commit Graph

1168 Commits

Author SHA1 Message Date
Glen Barber
acbbf33c47 MFH
Sponsored by:	The FreeBSD Foundation
2016-02-09 01:42:51 +00:00
Devin Teske
78a38b8f05 Adjust MAC algo to support interface branching 2016-02-09 01:41:03 +00:00
Devin Teske
43a45064a0 Adjust MAC allocation algo to support layering 2016-02-08 17:47:36 +00:00
Devin Teske
626ddc5125 Provide additional information on overall purpose 2016-02-08 17:36:46 +00:00
Devin Teske
0df549cba9 Fix copy/paste error; s/ngX/eXb/ 2016-02-08 17:30:17 +00:00
Glen Barber
bbb51924bb MFH
Sponsored by:	The FreeBSD Foundation
2016-02-08 12:16:01 +00:00
Devin Teske
7879db7636 Add two scripts for vnet jails
One for if_bridge(4) back-end, another for ng_bridge(4) back-end

Sponsored by:	FIS Global, Inc.
2016-02-07 16:41:54 +00:00
Glen Barber
1f4bcc459a More 'tests' packaging fixes.
Sponsored by:	The FreeBSD Foundation
2016-02-03 19:08:45 +00:00
Glen Barber
43faedc133 First pass to fix the 'tests' packages.
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:26:49 +00:00
Glen Barber
a11378bd93 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-14 13:29:12 +00:00
Kevin Lo
6e9a914bb2 Suggest setting gateway_enable="YES" instead of sysctl net.inet.ip.forwarding=1 to enable packet forwarding.
Reviewed by:	glebius
2016-01-14 01:32:17 +00:00
Glen Barber
0ca935a8f0 MFH
Sponsored by:	The FreeBSD Foundation
2016-01-13 04:11:04 +00:00
Marcelo Araujo
3bf7d9a6eb ypldap(8) is a feature ready to be used to translate nis(8) database to ldap(3).
This commit, fix a core dump on ypldap(8) related with memory allocation.
Also an example of how to set the ypldap.conf(5) properly is added to
examples files.

A new user _ypldap is required to be able to run ypldap(8) as well as
in a chroot mode.

Reviewed by:	rodrigc (mentor), bjk
Approved by:	bapt (mentor)
Relnotes:	Yes
Sponsored by:	gandi.net
Differential Revision:	https://reviews.freebsd.org/D4744
2016-01-13 01:49:35 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Enji Cooper
9c7fedcad3 Add missing return statement to atf/printf_test to make the example
complete and correct, and mute a compiler warning from clang

MFC after: 3 days
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
2015-12-20 02:36:30 +00:00
Christian Brueffer
24ae305fb7 Fix a typo in the CPUTYPE list.
PR:		205099
Submitted by:	xxjack12xx@gmail.com
MFC after:	1 week
2015-12-07 18:39:38 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Bryan Drewery
93e779a26c META MODE: These need object directories to handle staging.
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:27 +00:00
Alexander Motin
6d2a1fbf23 Add API to obtain primary enclosure name and ID for /dev/sesX devices.
sesX device number may change between reboots, so to properly identify
the instance we need more data.  Name and ID reported here may mach ones
reported by SCSI device, but that is not really required by specs.

MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2015-11-21 10:22:01 +00:00
Warner Losh
1f66462968 NO_CPU_OPTFLAGS doesn't exist, so don't document it. 2015-11-12 17:23:31 +00:00
Bryan Drewery
7d8f797b72 Use more appropriate ${SHAREDIR} rather than /usr/share.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-27 23:35:02 +00:00
Bryan Drewery
aa92269e46 Add more SUBDIR_PARALLEL.
MFC after:	3 weeks
Sponsored by:	EMC / Isilon Storage Division
2015-10-15 22:55:08 +00:00
Glen Barber
324fd1ce05 MFH to r289370
Sponsored by:	The FreeBSD Foundation
2015-10-15 17:36:56 +00:00
Enji Cooper
b2d48be1bc Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and
netbsd-tests.test.mk (r289151)

- Eliminate explicit OBJTOP/SRCTOP setting
- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk
- Remove unnecessary TESTSDIR setting
- Use SRCTOP where possible for clarity

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Divison
2015-10-12 08:16:03 +00:00
Baptiste Daroussin
9be27fdc00 Merge from head 2015-10-09 22:45:54 +00:00
Baptiste Daroussin
855ff27c8c Move all the dma(8) components into one single directory
Simplifying maintainance and options (only one place to deal with MK_DMAGENT)

This also makes packaging base less intrusive by getting a single point where
to add tags.
2015-10-09 22:09:44 +00:00
Marcel Moolenaar
8c96dcc166 Add option -l for specifying which OS loader to dlopen(3). By default
this is /boot/userboot.so. This option allows for the development and
use of other OS loaders.
2015-10-08 02:28:22 +00:00
Baptiste Daroussin
5a2b666ce5 Merge from head 2015-10-01 09:36:43 +00:00
Christian Brueffer
2aea45f0d5 Join excessive split lines.
MFC after:	1 week
2015-09-30 12:40:51 +00:00
Bryan Drewery
ec766071e3 META_MODE: Remove DEP_MACHINE from Makefile.depend files.
This has not been needed since r246865 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:44:01 +00:00
Bryan Drewery
54c7d75a06 META_MODE: Remove DEP_RELDIR from Makefile.depend files.
This has not been needed since r284171 in projects/bmake.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 19:26:08 +00:00
Baptiste Daroussin
b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Julio Merino
18bafc4da9 Add missing shebang
Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after:	1 week
2015-07-04 02:24:47 +00:00
Christian Brueffer
d14a50d95a Fix issues that kept some of the examples from actually working.
PR:		144534
Submitted by:	Nicolas Edel
MFC after:	1 week
2015-06-29 14:41:19 +00:00
Baptiste Daroussin
2fbd60ec47 Merge from head @274131 2015-06-20 00:58:46 +00:00
Neel Natu
9b1aa8d622 Restructure memory allocation in bhyve to support "devmem".
devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer
where doing a trap-and-emulate for every access is impractical. devmem is a
hybrid of system memory (sysmem) and emulated device models.

devmem is mapped in the guest address space via nested page tables similar
to sysmem. However the address range where devmem is mapped may be changed
by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is
usually mapped RO or RW as compared to RWX mappings for sysmem.

Each devmem segment is named (e.g. "bootrom") and this name is used to
create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom).
The device node supports mmap(2) and this decouples the host mapping of
devmem from its mapping in the guest address space (which can change).

Reviewed by:	tychon
Discussed with:	grehan
Differential Revision:	https://reviews.freebsd.org/D2762
MFC after:	4 weeks
2015-06-18 06:00:17 +00:00
Baptiste Daroussin
dad2fb7ece Merge from head 2015-06-15 10:56:01 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
5b381db8cc Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
Simon J. Gerraty
b589e6297b Remove extra blank lines 2015-06-10 14:08:36 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Andriy Gapon
2764d3bcdb bhyve/vmrun.sh: pass all existing readable disks to bhyveload(8)
This is done if the installation mode is not requested or auto-detected.
This is useful when a kernel has to be loaded from multiple disks.
For example from a RAID-Z pool or a ZFS pool with multiple top level
vdevs.

Differential Revision:	https://reviews.freebsd.org/D2723
Reviewed by:	neel
MFC after:	8 days
2015-06-05 15:16:26 +00:00
Andriy Gapon
2aa681ed31 bhyve/vmrun.sh: support passing disk options same as for bhyve(8)
Differential Revision:	https://reviews.freebsd.org/D2723
Reviewed by:	neel
MFC after:	8 days
2015-06-05 15:14:54 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin
59fa1525e0 Merge from head 2015-03-17 19:10:51 +00:00
Jung-uk Kim
25fd8105c9 Catch up with Clang 3.6.0. 2015-03-17 05:48:45 +00:00
Baptiste Daroussin
7426d57242 Merge from head 2015-03-15 10:58:47 +00:00
Gleb Smirnoff
e5a31fce25 Add -p parameter to list PCI device to pass through to the guest.
Reviewed by:	neel
2015-03-12 15:58:07 +00:00
Baptiste Daroussin
72392b205d Tag examples with targetted packages 2015-03-05 09:41:49 +00:00
Edward Tomasz Napierala
984a1cbfd6 Make the uefikeys script output slightly more obvious.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-02-26 14:22:27 +00:00
Edward Tomasz Napierala
12fe6c356b Add key/cert generation script for uefisign(8).
(Forgot about Relnotes in the commit that added uefisign(8), so set it here.)

MFC after:	1 month
Relnotes:	yes
Sponsored by:	The FreeBSD Foundation
2015-02-26 09:31:25 +00:00
Enji Cooper
b6f503dde0 Clean up more usb related files when MK_USB == no when dealing with
manpages, libraries, and binaries

MFC after: 1 week
X-MFC with: r278135
Sponsored by: EMC / Isilon Storage Division
2015-02-04 11:43:19 +00:00
Enji Cooper
02629e469f Add MK_BHYVE knob for building and installing bhyve(4), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 06:44:48 +00:00
Enji Cooper
4e39505449 Add MK_HAST knob for building and installing hastd(8), et al
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-26 06:27:07 +00:00
Neel Natu
1bd468a4e9 Make the error message explicit instead of just printing the usage if the
virtual machine name is not specified.

Requested by:	grehan
MFC after:	1 week
2015-01-18 01:50:10 +00:00
Enji Cooper
0341ccf227 Clean up more usb related files when MK_USB == no when dealing with
manpages, libraries, and binaries
2014-11-26 21:18:52 +00:00
Enji Cooper
466046ec0d Conditionalize a number of components in the tree
- bootparamd
- bootpd
- finger/fingerd
- ftp/ftpd
- hastctl/hastd
- iscsid, et al
- rbootd
- talk/talkd
- tcpd, et al
- tftp/tftpd

Add src.conf entries for the various components and do a best effort
at adding components to tools/build/mk/OptionalObsoleteFiles.inc
2014-11-26 08:44:05 +00:00
Enji Cooper
4be1ca354c Make building/installing bhyve optional via MK_BHYVE on amd64
Disable building/installing bhyve from src.opts.mk on unsupported
architectures (!amd64)
2014-11-25 19:20:25 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Mark Murray
10cb24248a This is the much-discussed major upgrade to the random(4) device, known to you all as /dev/random.
This code has had an extensive rewrite and a good series of reviews, both by the author and other parties. This means a lot of code has been simplified. Pluggable structures for high-rate entropy generators are available, and it is most definitely not the case that /dev/random can be driven by only a hardware souce any more. This has been designed out of the device. Hardware sources are stirred into the CSPRNG (Yarrow, Fortuna) like any other entropy source. Pluggable modules may be written by third parties for additional sources.

The harvesting structures and consequently the locking have been simplified. Entropy harvesting is done in a more general way (the documentation for this will follow). There is some GREAT entropy to be had in the UMA allocator, but it is disabled for now as messing with that is likely to annoy many people.

The venerable (but effective) Yarrow algorithm, which is no longer supported by its authors now has an alternative, Fortuna. For now, Yarrow is retained as the default algorithm, but this may be changed using a kernel option. It is intended to make Fortuna the default algorithm for 11.0. Interested parties are encouraged to read ISBN 978-0-470-47424-2 "Cryptography Engineering" By Ferguson, Schneier and Kohno for Fortuna's gory details. Heck, read it anyway.

Many thanks to Arthur Mesh who did early grunt work, and who got caught in the crossfire rather more than he deserved to.

My thanks also to folks who helped me thresh this out on whiteboards and in the odd "Hallway track", or otherwise.

My Nomex pants are on. Let the feedback commence!

Reviewed by:	trasz,des(partial),imp(partial?),rwatson(partial?)
Approved by:	so(des)
2014-10-30 21:21:53 +00:00
Neel Natu
e5db20c0c8 Use '-e' to check if the virtio backing file has already been created.
The '-f' check works fine on a regular file but not if the backing file is
a device (e.g., /dev/md0). In this case it would print a misleading but
otherwise benign message about the backing file not being present.

Submitted by:	Marcus Reid (marcus@blazingdot.com)
Discussed with:	grehan
2014-10-14 18:34:15 +00:00
Craig Rodrigues
a67d73f0ed Propagate the error status of /usr/sbin/bhyve out of the vmrun.sh script.
Clean up the /dev/vmm entry for this VM when vmrun.sh exits.

Reviewed by: neel
Phabric:     D767
2014-09-13 05:08:35 +00:00
Craig Rodrigues
f0be756181 Attach the ISO to an ahci-cd emulated device. The
ISO will appear to be mounted on a /dev/cd device
instead of /dev/vtbd.  This is similar to how other
virtualization environments handle mounting ISO images.

Reviewed by: neel
2014-09-12 02:38:10 +00:00
Craig Rodrigues
2131e64e12 Use "file -s", so that we can run vmrun.sh against special devices such
as /dev/md memory file systems

Reviewed by: neel
2014-08-28 16:26:13 +00:00
Craig Rodrigues
1437f5003e If the VM was reset via "/sbin/reboot" or "shutdown -r",
then it is no longer necessary to "bhyvectl --destroy" the VM when it reboots.
Move the "bhyvectl --destroy" outside of the while loop.

Reviewed by: neel
2014-08-25 01:36:56 +00:00
Craig Rodrigues
ff5cb9fd50 Add comment which describes the exit status codes returned from
/usr/sbin/bhyve.  These are in src/usr.sbin/bhyve/bhyverun.c.

Reviewed by: neel
2014-08-25 01:04:07 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Edward Tomasz Napierala
a1577802f0 Remove vestiges of previous autofs.
Discussed with:	alfred@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-18 14:47:13 +00:00
George V. Neville-Neil
46b315b29a Various style(9) and related fixes.
Update the copyright to be more in line with the current version in
our tree.
Remove the ancient rcsid.
Add a proper return from the main function

Pointed out by: bz
2014-07-31 18:02:38 +00:00
George V. Neville-Neil
ea43014585 Add an example program to show how to use libpmc from a program.
This particular program attempts to use the TSC to measure how long
certainly libpmc operations take.  Depending on the quality of
the rdtsc() macro on a particular architecture this may work
more or less well.
2014-07-31 09:18:15 +00:00
Marcel Moolenaar
e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Neel Natu
874a6e051b After r267897 brought in a new version of file/libmagic, a filesystem image
is identified as "DOS/MBR boot sector" as opposed to "x86 boot sector".

This trips up vmrun.sh when using the new file(1) and makes it want to boot
into the installer instead.

Fix this by just looking for "boot sector" instead.
2014-06-27 17:18:54 +00:00
Gavin Atkinson
2be4135815 Remove example cvsup config files.
MFC after:	1 week
2014-06-25 12:32:41 +00:00
Gavin Atkinson
95c4761238 Drop example variables for updating over csup. These have not functioned
since r251084.

MFC after:	1 week
2014-06-25 12:23:16 +00:00
Baptiste Daroussin
bd0891ceb3 use .Mt to mark up email addresses consistently (part1)
PR:		191174
Submitted by:	Franco Fichtner  <franco@lastsummer.de>
2014-06-20 09:40:43 +00:00
Alfred Perlstein
3ab512ae80 Support for multiple disks and tap devices.
This allows you to give a bhyve instance multiple network devices
and disk devices easily by specifying additional "-d " and "-t "
options.

Reviewed by: neel
Sponsored by: Norse
2014-06-17 00:53:00 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
John Baldwin
9b997115fb - Format the usage so that it fits in 80 cols and follows the standard
convention for long usage lines in manpages.
- Sort the option string passed to getopts and the case statements for
  the option returned by getopts.
- Add a -C option to specify the device to be used for the console
  (defaults to 'stdio')  (This could be let vmrun be run in the background
  by using /dev/nmdm0B or the like)
- Add a -H option to specify a host path to pass to bhyveload(8) via
  -h to back the host0: filesystem in bhyveload(8) (useful for loading
  kernels from the host into the guest without having to copy them into
  the guest's disk image first)

Reviewed by:	neel
MFC after:	2 weeks
2014-04-23 20:55:07 +00:00
Warner Losh
0abe2561f6 Convert NO_MANCOMPRESSED to MK_MANCOMPRESSED. 2014-04-18 17:03:49 +00:00
Warner Losh
a0f4cb1e7b r264402 builds fine, but turns out there are problems with
install. Back it out until they can be tracked down.
2014-04-13 21:52:27 +00:00
Warner Losh
5bce97114a Convert NO_MANCOMPRESS to normal convention. 2014-04-13 05:22:26 +00:00
Warner Losh
3bdf775801 NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.
2014-04-13 05:21:56 +00:00
Jung-uk Kim
6619822598 Add new CPUTYPEs supported by Clang 3.4, i.e., AMD Steamroller (bdver3) and
Intel Silvermont (slm) processors.
2014-03-20 19:17:46 +00:00
Ian Lepore
44653522f6 Add a way to apply CFLAGS only when building the given architecture. This
is useful primarily on a system used for cross-building, when you have a
set of flags to apply to the TARGET_ARCH being cross-built but don't want
those settings applied to building the cross-tools or other components that
run on the build host machine.
2014-03-19 18:54:53 +00:00
Julio Merino
9b84048643 Remove unnecessary svn:executable property from source file.
The atf cp_test.sh sample file should have never been marked executable in
the first place because this file needs to be "built" first before being
usable.
2014-03-14 12:55:06 +00:00
Julio Merino
f5fd950e35 Make bsd.test.mk the only public mk fragment for the building of tests.
Change {atf,plain,tap}.test.mk to be internal implementation details of
bsd.test.mk.  Makefiles that build tests should now only include bsd.test.mk
and declaratively specify what they want to build, without worrying about
the internal implementation of the mk files.

The reason for this change is to permit building test programs of different
interfaces from a single directory, which is something I had a need for
while porting tests over from src/tools/regression/.

Additionally, this change makes it possible to perform some other requested
changes to bsd.test.mk in an easier manner.  Coming soon.
2014-03-14 08:56:19 +00:00
Baptiste Daroussin
b1771e3dc6 Add the makefile forgotten in previous commit 2014-03-10 15:59:50 +00:00
Baptiste Daroussin
2c4c3f6750 Add a mailer.conf example to use dma 2014-03-10 14:36:27 +00:00
Julio Merino
9e684a3a79 Generate plain sh test programs from a source file.
Instead of assuming that plain sh test programs exist in the source
tree in their final form and are marked as executable, generate them
from a list of sources.

By default, just assume that the source file for a program P is P.sh
but allow the caller to customize the inputs.  Similarly, also allow
the caller to apply sed(1) replacements on the output.  These will
both be useful in hooking existing test code from tools/regression/
into the test suite.

Approved by:	rpaulo (mentor)
2013-11-25 13:30:06 +00:00
Julio Merino
21203fdd06 Add some sample test programs.
This change adds some sample test cases to share/examples/tests/
demonstrating the basic usage of the atf and plain interfaces.

These test programs are fully-functional and are installed as part
of the test suite, which guarantees that the sample code remains
correct.  However, they currently mostly serve as a placeholder for
additional examples and may be incomplete (depending on how you
look at them).  I will see what else can be useful while working on
documentation.

As a bonus, the addition of these tests exercise the *.test.mk files,
one of which (plain.test.mk) was not yet in use, and also demonstrates
that it's possible to mix different kinds of test programs into the
same test suite.

Approved by:	rpaulo (mentor)
2013-11-18 12:57:46 +00:00
Gleb Smirnoff
3135fb5e8b Finish r257779.
PR:	usb/183728
2013-11-07 14:05:49 +00:00
Hans Petter Selasky
2578c12e39 - Use libusb20_strerror() function instead of custom usb_error() one.
- Rename "aux.[ch]" to "util.[ch]" which is a more common name for
utility functions and allows checkout on some non-FreeBSD systems
where the "aux.*" namespace is reserved.
- Fix some compile warnings while at it.

PR:		usb/183728
MFC after:	2 weeks
2013-11-07 07:22:51 +00:00
Neel Natu
a1a4cbea58 Make the virtual ioapic available unconditionally in a bhyve virtual machine.
This is in preparation for moving the ioapic device model from userspace to
vmm.ko.

Reviewed by:	grehan
2013-10-31 05:44:45 +00:00
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
Neel Natu
b6afa84b8c Add an option to bhyveload(8) that allows setting a loader environment variable
from the command line.

The option syntax is "-e <name=value>". It may be used multiple times to set
multiple environment variables.

Reviewed by:	grehan
Requested by:	alfred
2013-10-17 00:28:35 +00:00
Simon J. Gerraty
3caf0790a8 Merge head@256284 2013-10-13 02:35:19 +00:00
Simon J. Gerraty
c8191bc69e We do want objdir 2013-10-13 00:27:34 +00:00
Simon J. Gerraty
34b33809b7 Updated dependencies 2013-10-13 00:24:00 +00:00