Turns out this .if evaluated not in the context of the makedtb target
sometimes due to Makefile expansion rules. Make the test for things
being NULL elsewhere...
Fix logic error. <blush>

Submitted by: ian@
Small cleanup: mostly whitespace vs. tabs.
Provide an alias for the userboot console and name it 'comconsole'.
This allows existing loader.conf files that set "console=comconsole"
to work without failing. No functional difference otherwise.

Reported by:	Michael Dexter, pfSense install.
Reviewed by:	neel
MFC after:	3 weeks
citrus: Avoid invalid code points.

From the OpenBSD log:
The UTF-8 decoder should not accept byte sequences which decode to unicode
code positions U+D800 to U+DFFF (UTF-16 surrogates), U+FFFE, and U+FFFF.

http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8
http://unicode.org/faq/utf_bom.html#utf8-4

Reported by:	Stefan Sperling
Obtained from:	OpenBSD
MFC after:	5 days
Add freebsd-boot to recognized partition types.
Use mkimg instead of md(4) and gpart.
Remove unnecessary headers.  Sort out the headers.  Add a missing header on
ofw_gpiobus.c (it was working because of sys/libkern.h).
Some style and whitespace fixes.  Reduce the difference between geom_uzip(4)
and geom_uncompress(4).  Now, they produce an almost clean diff(1) output.

Remove a duplicated variable from g_uncompress.c and an unnecessary header
from g_uzip.c.

No functional changes.
Actually the FEATURE() macro is defined on sys/sysctl.h.

Pointyhat to:	loos
Fix rnh_walktree_from() function (patch from kern/174959).
Require valid netmask to be passed since host route is always a leaf.

PR:		kern/174959
Submitted by:	Keith Sklower
MFC after:	2 weeks
Fix a leak in g_uzip_taste().  After retrieve all the block offsets from
the uzip image, free the last data read.
Fix a 2038 bug.

If time_t is 64-bit (i.e. isn't 32-bit) allow any value of year, not
just years less than 2038.

Don't bother fixing the underflow in the case of years before 1903.

MFC after:	1 week
Sponsored by:	DARPA, AFRL
regex: Remove some unreachable breaks.

This is based on a much bigger cleanup done in Illumos.

Reference:
https://www.illumos.org/issues/2077

MFC after:	1 week
Add logic in the HLT exit handler to detect if the guest has put all vcpus
to sleep permanently by executing a HLT with interrupts disabled.

When this condition is detected the guest with be suspended with a reason of
VM_SUSPEND_HALT and the bhyve(8) process will exit.

Tested by executing "halt" inside a RHEL7-beta guest.

Discussed with:	grehan@
Reviewed by:	jhb@, tychon@
Add tracking for self-generated frames when the VAP is in sleep state.

The hardware can generate its own frames (eg RTS/CTS exchanges, other
kinds of 802.11 management stuff, especially when it comes to 802.11n)
and these also have PWRMGT flags.  So if the VAP is asleep but the
NIC is in force-awake for some reason, ensure that the self-generated
frames have PWRMGT set to 1.

Now, this (like basically everything to do with powersave) is still
racy - the only way to guarantee that it's all actually consistent
is to pause transmit and let it finish before transitioning the VAP
to sleep, but this at least gets the basic method of tracking and
updating the state debugged.

Tested:

* AR5416, STA mode
* AR9380, STA mode
Ignore the error from pipespace_new when creating a pipe.

It can fail if pipe map is exhausted (as a result of too many pipes created),
but it is not fatal and could be provoked by unprivileged users. The only
consequence is worse performance with given pipe.

Reported by:	ivoras
Suggested by:	kib
MFC after:	1 week
Switch to use arm_devmap_add_entry() to setup static device mapping.

Approved by:	stas (mentor)
Honor the max-frequency property if it appears in the fdt data.
Adjust the exynos and zedboard dts files to use max-frequency (the
documented standard property) instead of clock-frequency.

Submitted by:	Thomas Skibo <ThomasSkibo@sbcglobal.net>
Don't allow MPtable generation if there are multiple PCI hierarchies. This is
because there isn't a standard way to relay this information to the guest OS.

Add a command line option "-Y" to bhyve(8) to inhibit MPtable generation.

If the virtual machine is using PCI devices on buses other than 0 then it can
still use ACPI tables to convey this information to the guest.

Discussed with:	grehan@