Use 2K buffers for IO to help achieve full device speed, rather than the
default wMaxPacketSize (64 or 512 bytes).  This actually helps older FTDI
devices (which were USB 1/full speed) more than the new H-series high
speed, but even for the new chips it helps cut the number of interrupts
when doing very high speed (3-12mbaud).
Fix an issue where the locale and rune locale could become out of sync,
causing mb* functions (and similar) to be called with the wrong data
(possibly a null pointer, causing a crash).

PR:		standards/188036
MFC after:	1 week
Document more parition types.

Requested by:	glebius
MFC after:	1 week
MFV	r258379;

4248 dtrace(1M) should never create DOF with empty probes section
4249 Only probes from the first DTrace object file will be included

Illumos Revision:	4a20ab41aadcb81c53e72fc65886e964e9add59

Reference:
https://www.illumos.org/issues/4248
https://www.illumos.org/issues/4249

Obtained from:	Illumos
MFC after:	1 month
Add support for event timers whose clock frequency can change while running.
Add support for some block functions that come from OS X.  These are
intended to build with any C compiler.

Reviewed by:	pfg
MFC after:	3 weeks
Move scandir_b to a later symbol version.
FreeBSD make (aka fmake) doesn't grok .MAKE.LEVEL. Failsafe and assume
that it is OK to set MK_xxx flags.
Move setting of the MK_xxx variables based on NO_xxx to avoid
triggering the "you aren't allowed to set this" warning when building
stand alone in directories whose Makefile sets NO_MAN, for example.
Use xz(1) instead of gzip(1) to compress release images
when WITH_COMPRESSED_IMAGES is used.

Requested by:	delphij, brooks, Nikolai Lifanov
MFC After:	1 week
X-MFC-With:	r264027,r264028,r264029,r264030
Sponsored by:	The FreeBSD Foundation
Fix build breakage.  Apparently all ARM configs build kern_et.c, but only a
few of them also build kern_clocksource.c.  That strikes me as insane, but
maybe there's a good reason for it.  Until I figure that out, un-break
the build by not referencing functions in kern_clocksource if NO_EVENTTIMERS
is defined.
Disable the timer and clear any pending bit, then setup the new counter
register values, then restart the timer.  This prevents a situation where
an old event fires just as we're about to load a new value into the timer,
when the start routine is called to change the time of the current event.

Also re-nest the parens properly for casting the result of converting
time and frequency to a count.  This doesn't actually change the result of
the calcs, but will some day prevent a loss-of-precision warning on the
assignment, if that warning gets enabled.
Trivial changes/forced-commit to document previous change r264050 whose
description was eaten by the dog (or an editor crash or something).

Add variable-frequency support to the arm mpcore eventtimer driver.

This allows a platform's early init code to tell the mpcore driver that the
clock frequency can vary.  That causes the mpcore driver to register an
eventtimer, but not a timecounter.  The platform has to provide a time
counter using some other fixed-frequency clock, but can still use the
per-cpu goodness of the mpcore hardware for event timers.

When the platform support code does something to change the frequency of
the CPU clocks (power saving, thermal management) it must tell the mpcore
driver code about it using arm_tmr_change_frequency().
Don't call sdhci_init_slot() until after handling the FDT properties
related to detecting card presence.  This actually makes no difference
now, but will when we get support for gpio-based card detection.
Change NO_EVENTTIMERS from an arm-specific to an MI option, so that it can
be used in MI code.

This is intended as a temporary measure to unbreak the build.  The real fix
is to write event timer drivers for legacy arm hardware, then get rid of
this option completely.  That's going to take a few days.
Add support for the virtio RNG entropy-source device.
Call through to /dev/random synchronously to fill
virtio buffers with RNG data.

Tested with FreeBSD-CURRENT and Ubuntu guests.

Submitted by:	Leon Dang
Discussed with:	markm
MFC after:	3 weeks
Sponsored by:	Nahanni Systems
Switch imx6 to using the mpcore per-cpu event timers, but continue to use
the GPT timer, which is fixed-frequency, as a timecounter.
Rework the cpu frequency management code for imx6.

This adds the concept of "operating points," combinations of frequency
and voltage at which the cpu is known to work correctly.  Some day these
should come from FDT data, but for now the table is hard-coded.

This also allows tuning the min and max operating frequencies.  The min
frequency is what the thermal management code will slow down to if the
core temperature gets too high.  The max frequency is what gets used if
the temperature is okay.

Normally the max cannot be set higher than the value burned into the
ocotp fuses as the chip's rated max, but there is now a new sysctl+tunable
cpu_overclock_enable; when set to non-zero it allows raising the frequency
above the ocotp value: USE WITH CARE!  (At least one of my imx6 boards
has a cpu whose ocotp values never got set correctly; they claim a max
of 792mhz, but the physical markings on the chip say it's good to 1ghz.)

Because all these values affect the entire SoC, there is a new sysctl
node, hw.imx6, where all these values live.  The values that are currently
under dev.imx6_anatop.0 should probably move to hw.imx6 too, because
"anatop" doesn't even mean anything to me, let alone to an end user.
Fix build, broken by r264025.

Sponsored by:	The FreeBSD Foundation