Stop accessing the saved stack pointer by looking past the end of the
array of registers.

Submitted by:	Michal Meloun <meloun at miracle.cz>
Make in6_pcblookup_hash_locked and in6_pcbladdr static.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
Make it possible to disable NOP-In PDUs by the iSCSI initiator by setting
kern.cam.ctl.iscsi.ping_timeout to 0.  This fixes interoperability with
some initiators that don't properly support NOP-Ins, namely iPXE/gPXE.

Submitted by:	Chen Wen <pokkys@gmail.com>
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Add more register values to armreg.h and remove CPU_CONTROL_32BP_ENABLE
from asm.h as they were already defined in armreg.h.

Submitted by:	Michal Meloun <meloun at miracle.cz>
Make sure we handle less than zero timeouts in iSCSI initiator and target
in a reasonable way.

Sponsored by:	The FreeBSD Foundation
Add additional checks for IPV6_PKTINFO handling (RFC 3542):

* Return ENETDOWN when interface specified by ipi6_ifindex is not
  enabled for IPv6 use.
* Return EADDRNOTAVAIL when ipi6_ifindex specifies an interface, but the
  address ipi6_addr is not available for use on that interface.
* Return EINVAL when ipi6_addr is multicast address.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
Abort the create_socket test if socket creation fails.

MFC after:	1 week
Reported by:	Coverity
CID:		1232756
Unify interrupts bit definition and usage. While here remove PSR_C_bit.

Submitted by:	Svatopluk Kraus <onwahe at gmail.com>,
		Michal Meloun <meloun at miracle.cz>
Differential Revision: https://reviews.freebsd.org/D754
Add scope zone id to the in_endpoints and hc_metrics structures.

A non-global IPv6 address can be used in more than one zone of the same
scope. This zone index is used to identify to which zone a non-global
address belongs.

Also we can have many foreign hosts with equal non-global addresses,
but from different zones. So, they can have different metrics in the
host cache.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
Conditionalize build of etcupdate(8) on MK_RCS. Since etcupdate calls
merge(1), which is part of the RCS package, it must not be installed if
WITHOUT_RCS update is set. Otherwise, it will produce confusing errors.

CR:		https://reviews.freebsd.org/D691
MFC after:	1 week
Sponsored by:	Spectra Logic
Regen after 271401.

Sponsored by:	Spectra Logic
Add PCI ID for Promise TX8660 8-port 3Gbps HBA.

This device reports RAID subclass, but appears to be AHCI compatible.

Submitted by:	Yuri Perejilin <yuri@rivera.ru>
MFC after:	1 week
Move code to set various MSRs on AMD cpus out of printcpuinfo() and
into initalizecpu() instead.
Add support for calling pcibios routines from the
bootloader. Implement the following routines:
	pcibios-device-count	count the number of instances of a devid
	pcibios-read-config	read pci config space
	pcibios-write-config	write pci config space
	pcibios-find-devclass	find the nth device with a given devclass
	pcibios-find-device	find the nth device with a given devid
	pcibios-locator		convert bus device function ti pcibios locator
These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More
informaiton, such as it is, can be found in the standard.

Export a nunmber of pcibios.X variables into the environment to report
what the PCI IDENTIFY command returned.

Also implmenet a new command line primitive (pci-device-count), but don't
include it by default just yet, since it depends on the recently added
words and any errors here can render a system unbootable.

This is intended to allow the boot loader to do special things based
on the hardware it finds. This could be have special settings that are
optimized for the specific cards, or even loading special drivers. It
goes without saying that writing to pci config space should not be
done without a just cause and a sound mind.

Sponsored by:	Netflix
Extend UNMAP blacklist on all STEC SSD models.

None of existing STEC devices need UNMAP or even support it well, having
many limitations and even hanging sometimes executing those commands.
New devices that may use UNMAP going to be released under HGST name.

MFC after:	3 days
To workaround an errata on certain Pentium Pro CPUs, i386 disables
the local APIC in initializecpu() and re-enables it if the APIC code
decides to use the local APIC after all.  Rework this workaround
slightly so that initializecpu() won't re-disable the local APIC if
it is called after the APIC code re-enables the local APIC.
MFamd64: Use initializecpu() to set various model-specific registers on
AP startup and AP resume (it was already used for BSP startup and BSP
resume).
- Split code to do one-time probing of cache properties out of
  initializecpu() and into initializecpucache().  This is called once on
  the BSP during boot.
- Move enable_sse() into initializecpu().
- Call initializecpu() for AP startup instead of enable_sse() and
  manually frobbing MSR_EFER to enable PG_NX.
- Call initializecpu() when an AP resumes.  In theory this will now
  properly re-enable PG_NX in MSR_EFER when resuming a PAE kernel on
  APs.
Fix header output when -P is specified and (ncpus - 1) != maxid.

Reported by:	Hiroaki Shimizu
PR:		152738
Fix a bug which could break extended attributes in a dump output.
This occurred when a file was >892kB long and had a large data (>1kB)
in the extended attributes.

Reported by:	Masashi Toriumi
Reviewed by:	mckusick
Use the linker to perform relocations in the SUNW_dof section rather than
doing them in drti during startup. This fixes a number of problems with
using USDT probes in stripped executables and shared libraries, and with
USDT probes in static functions.

Reviewed by:	rpaulo
MFC after:	1 month
Sponsored by:	EMC / Isilon Storage Division
Phabric: 	D751