In sys/sparc64/sparc64/spitfire.c, prevent signed shift overflow by
casting to the appropriate type.  (Note this fix cannot be done in
sys/sparc64/sparc64/spitfire.c, since that file is also included by
assembly source files.)

Reviewed by:	marius
MFC after:	3 days
Make sure a for loop in fire_alloc_msix() terminates, by making the loop
counter signed.

Reviewed by:	marius
MFC after:	3 days
Updates for WSP driver:

1) Add support for page back/forward.
2) While doing HOR scrolling, disable VER scrolling.
3) Checking dx_sum and dy_sum before emulate right button, this can
avoids unexpected right button press.
4) Fix stable pointer operation when emulating middle button.

Submitted by:	Huang Wen Hui <huanghwh@gmail.com>
MFC after:	2 weeks
Don't generate devd rules for WSP device ID's found in the ATP driver yet.

MFC after:	2 weeks
Increase maximum number of columns to support 1980x1200 displays.

In my specific case, this fixes the problem of my PowerMac G5 displaying a
4:3 console on a 16:10 display with black bars on the left and right.

PR:		kern/180558
Reviewed by:	nwhitehorn
MFC after:	5 days
Invalidate the SCU cache tag ram on all 4 cores, not just 1-3.  I misread
Juergen's original code, it was doing all 4 cores.  Also remove the L2
cache invalidate operation, this code runs before L2 is activated.
- Pin configuration is a complete iomux register now and includes
  drive strength, pull mode, mux mode, speed, etc.
- Add i2c devices to the tree
- Add IPG clock
In puthdr(), start the ELF .data section on a new page, as this is
what btxldr expects (.set MEM_DATA,start+0x1000 in btxldr.S).

This makes resulting ELF binaries bootable with grub, gptboot and boot2.

PR:		153801
Submitted by:	Gleb Kurtsou <gleb.kurtsou at gmail.com>
Tested by:	Ruben Kerkhof <ruben at rubenkerkhof.com>
Glanced at by:	jhb, peter
MFC after:	1 month
Teach userboot to comply with WITHOUT_CDDL/WITHOUT_ZFS

Apparently, LIBZFS is set to a non-empty string when WITHOUT_CDDL/WITHOUT_ZFS
are set, I think this is a bug, but work around this feature for now.

Reviewed by:	grehan
Arguments for malloc and calloc should be size_t, not int.
Use proper bounds check when trying to free cached memory.

Spotted by: Xin Li
Tested by:  Dmitry Sivachenko
MFC after:  2 weeks
Remove more constants related to static sysctl nodes.  The MAXID constants
were primarily used to size the sysctl name list macros that were removed
in r254295.  A few other constants either did not have an associated
sysctl node, or the associated node used OID_AUTO instead.

PR:		ports/184525 (exp-run)
Rough cleanup (new sentence -> new line, grammar, spelling, mdoc).
This could use more work.

PR:		187035 (in part)
Submitted by:	Bjorn Heidotting
MFC after:	1 week
Slightly better revision of teaching userboot how to respect MK_CDDL

Reviewed by:	grehan
release.sh:
- Add a VCSCMD variable that defaults to 'svn checkout',
  and update places 'svn co' is used directly.
- After sourcing a configuration file, prefix SRCBRANCH,
  PORTBRANCH, and DOCBRANCH with the SVNROOT.
- Properly capitalize 'FreeBSD.org' in the default SVNROOT.
- Update Copyright.

release.conf.sample:
- Add an example to use git instead of svn, by nullifying
  SVNROOT, and setting SRCBRANCH, DOCBRANCH, and PORTBRANCH
  to the URL fo a git repository.

release.7:
- Document VCSCMD.

Submitted by:	Rick Miller (based on)
Sponsored by:	The FreeBSD Foundation
Refresh our implementation of OpenBSD's Blowfish password format.

Notable changes:

 - Support of $2b$ password format to address a problem where very
   long passwords (more than 256 characters, when an integer
   overflow would happen and cause the length to wrap at 256).
 - Updated pseudo code in comments to reflect the reality.
 - Removed our local shortcut of processing magic string and rely
   on the centralized and tigntened validation.
 - Diff reduction from upstream.

For now we are still generating the older $02a$ format of password
but we will migrate to the new format once the format is formally
finalized.

MFC after:	1 month
Fix comment introduced in r262480: it's 1920x1200, not 1980x1200.

PR:		kern/180558
MFC after:	5 days
In release/Makefile, remove exclusion of CVS directories in the
src/ and ports/ distributions.

While I am thinking about it, exclude .git directories for src/
and ports/, as somewhat of a followup to r262499.

Sponsored by:	The FreeBSD Foundation
Queue pending exceptions in the 'struct vcpu' instead of directly updating the
processor-specific VMCS or VMCB. The pending exception will be delivered right
before entering the guest.

The order of event injection into the guest is:
- hardware exception
- NMI
- maskable interrupt

In the Intel VT-x case, a pending NMI or interrupt will enable the interrupt
window-exiting and inject it as soon as possible after the hardware exception
is injected. Also since interrupts are inherently asynchronous, injecting
them after the hardware exception should not affect correctness from the
guest perspective.

Rename the unused ioctl VM_INJECT_EVENT to VM_INJECT_EXCEPTION and restrict
it to only deliver x86 hardware exceptions. This new ioctl is now used to
inject a protection fault when the guest accesses an unimplemented MSR.

Discussed with:	grehan, jhb
Reviewed by:	jhb
Chase r262505, and remove CVS exclusion from picobsd builds.

Sponsored by:	The FreeBSD Foundation
Revert r262466, as it does not compile on PowerPC.

Reported by:	jhibbits