Fix "fdt addr" to accept literal addresses rather than va offsets.
When initializing the fdt, query U-Boot as well.

With this change, it is now feasible to have U-Boot load
the FDT, ubldr will pull it from U-Boot and hand it to the
kernel.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247045 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Initialize vm_max_kernel_address on non-FDT platforms.  (This should have
been included in r246926.)

The second parameter to pmap_bootstrap() is redundant.  Eliminate it.

Reviewed by:	andrew


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247046 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Convert machine/elf.h, machine/frame.h, machine/sigframe.h,
machine/signal.h and machine/ucontext.h into common x86 includes,
copying from amd64 and merging with i386.

Kernel-only compat definitions are kept in the i386/include/sigframe.h
and i386/include/signal.h, to reduce amd64 kernel namespace pollution.
The amd64 compat uses its own definitions so far.

The _MACHINE_ELF_WANT_32BIT definition is to allow the
sys/boot/userboot/userboot/elf32_freebsd.c to use i386 ELF definitions
on the amd64 compile host.  The same hack could be usefully abused by
other code too.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247047 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Orphaned processes that are being traced are killed by the
kernel.  Properly restore, continue, and detach from processes
being DTraced when DTrace exits with an error so the program
being inspected is not terminated.

cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:
	In fatal(), the generic error handler, close the DTrace
	handle as is done in the "probe/script" error handler
	dfatal().  fatal() can be invoked after DTrace attaches
	to processes (e.g. a script specified by command line
	argument can't be found) and closing the handle will
	release them.

Submitted by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247048 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Avoid panic when tearing down the DTrace pid provider for a
process that has crashed.

sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c:
	In fasttrap_pid_disable(), we cannot PHOLD the proc
	structure for a process that no longer exists, but
	we still have other, fasttrap specific, state that
	must be cleaned up for probes that existed in the
	dead process.  Instead of returning early if the
	process related to our probes isn't found,
	conditionalize the locking and carry on with a NULL
	proc pointer.  The rest of the fasttrap code already
	understands that a NULL proc is possible and does
	the right things in this case.

Sponsored by:	Spectra Logic Corporation
Reviewed by:	rpaulo, gnn
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247049 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Various improvements to the qsort(3) usage example:

- Remove unused #include.
- Do not cast away const.
- Use the canonical idiom to compare two numbers.
- Use proper type for sizes, i.e. size_t instead of int.
- Correct indentation.
- Simplify printf("\n") to puts("").
- Use return instead of exit() in main().

Submitted by:	Christoph Mallon, christoph.mallon at gmx.de
Approved by:	gjb (mentor)
Reviewed by:	stefanf
MFC after:	1 week


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247050 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sort sections.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247051 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Support hardlinks in manifest files by the same logic as the treewalk
code.

Reviewed by:	marcel
Sponsored by:	DARPA, AFRL


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247052 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix parallel build race with DEBUG_FLAGS

Reported by: Jan Beich on freebsd-current
Tested by: markj


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247054 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
revert 247035


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247056 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove the unused spl functions: spl0, splsoftcam, splsofttty,
splsofttq and splstatclock.

Other used spl functions to follow.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247059 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Do not use deprecated functions from libarchive


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247060 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
When porting XTS-related code from OpenBSD I forgot to update copyright (only
OpenBSD was credited in one of two commits). Fix it.

Reported by:	Theo de Raadt <deraadt@cvs.openbsd.org>
Reviewed by:	Damien Miller <djm@mindrot.org>


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247061 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and
CSUM_TCP too.  They are all set explicitly by the kernel usually.

While here, fix an unrelated bug where hardware L4 checksum calculation
was accidentally disabled for some IPv6 packets.

Reported by:	alfred@
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247062 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Refresh on the shared code for the E1000 drivers.
  - bear with me, there are lots of white space changes, I would not
    do them, but I am a mere consumer of this stuff and if these drivers
    are to stay in shape they need to be taken.

em driver changes: support for the new i217/i218 interfaces

igb driver changes:
  - TX mq start has a quick turnaround to the stack
  - Link/media handling improvement
  - When link status changes happen the current flow control state
    will now be displayed.
  - A few white space/style changes.

lem driver changes:
  - the shared code uncovered a bogus write to the RLPML register
    (which does not exist in this hardware) in the vlan code,this
    is removed.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247064 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
No longer need splhigh() since locking was done, delete it and
comments about it.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247065 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace splhigh() with critical_enter()/leave() to ensure we write the
config mode unlock sequence quickly enough. This likely isn't too critical,
since splhigh() has been a noop for a decade...


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247066 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Kill now-bogus splhigh() -- it is a nop


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix broken usage of splhigh() by removing it.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247068 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
The other giant locked storage drivers have removed splbio(), for the
most part, so remove it here too. Anybody locking this driver will need
far more than locks where splbio() were, so remove these nops.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@247069 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f