Document the behavior (from 4.4-lite) that tokens returned by telldir() are
single use.

Sponsored by:	DARPA, AFRL
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238141 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Now that our assembler supports the xsave family of instructions, use them
natively rather than hand-assembled versions.  For xgetbv/xsetbv, add a
wrapper API to deal with xcr* registers: rxcr() and load_xcr().

Reviewed by:	kib
MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238142 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Remove the "funny targets" make check.  We no longer need embedded :: targets
to build FreeBSD (they are used in Perl man pages).  We never needed embedded
"!" in targets that I can find.

We got this from OpenBSD and I cannot find any other make that supports
such things -- contrary to their commit message claim: "This behaviour
is also consistent with other versions of make.".


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238143 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Sync with Intel internal source:
   shared code update and small changes in core required
Add support for new i210/i211 devices
Improve queue calculation based on mac type

MFC after:5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238148 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Update to the ixgbe driver:
  - Add a couple of new devices
  - Flow control changes in shared and core code
  - Bug fix to Flow Director for 82598
  - Shared code sync to internal with required core change

Thanks to those helping in the testing and improvements to this driver!

MFC after:5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238149 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Correct small regressions pointed out by jhb, thanks John.

MFC after:5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238151 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tested by:	andreast, jhibbits


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238159 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Make pmap_enter()'s management of PV entries consistent with the other pmap
functions that manage PV entries.  Specifically, remove the PV entry from
the containing PV list only after the corresponding PTE is destroyed.

Update the pmap's wired mapping count in pmap_enter() before the PV list
lock is acquired.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238163 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add another PS/2 keyboard PNP ID.  This ID is listed as
"Reserved by Microsoft" in the standard PNP ID table, but has been seen
in the wild on at least one laptop.

PR:		kern/169571
Submitted by:	Matthias Apitz  guru unixarea de
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238164 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow threads to finish up when terminated by user

Set a flag and allow worker threads to finish upon ^C, instead of
immediately cancelling them, so that final packet count and rate
stats can be displayed.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238165 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Several fixes to the amd64 disassembler:
- Add generic support for opcodes that are escape bytes used for
  multi-byte opcodes (such as the 0x0f prefix).  Use this to replace
  the hard-coded 0x0f special case and add support for three-byte
  opcodes that use the 0x0f38 prefix.
- Decode all Intel VMX instructions.  invept and invvpid in particular are
  three-byte opcodes that use the 0x0f38 escape prefix.
- Rework how the special 'SDEP' size flag works such that the default
  instruction name (i_name) is the instruction when the data size
  prefix (0x66) is not specified, and the alternate name in i_extra is
  used when the prefix is included.
- Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses
  between i_name and i_extra based on the address size prefix (0x67).
  Use this to fix the decoding for jrcxz vs jecxz which is determined
  by the address size prefix, not the operand size prefix.  Also, jcxz
  is not possible in 64-bit mode, but jrcxz is the default instruction
  for that opcode.
- Add support for handling instructions that have a mandatory 'rep'
  prefix (this means not outputting the 'repe ' prefix until determining
  if it is used as part of an opcode).  Make 'pause' less of a special
  case this way.
- Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions
  but with a REX.W prefix.

MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238166 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Add support for the 'invept' and 'invvpid' instructions.  Beyond simply
adding appropriate table entries, the assembler had to be adjusted as
these are the first non-SSE instructions to use a 3-byte opcode (and a
mandatory prefix to boot).

MFC after:	1 month


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238167 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
r237748 continuation: segment-override prefixes are not invalid in long mode

Update DTrace disassembler accordingly.  The code to treat the prefixes
as null prefixes was already in place.
Although in practice compilers seem to generate only cs-prefix for use
in long NOPs, the same treatment is applied to all of cs, ds, es, ss for
consistency.

Reported by:	emaste
Tested by:	emaste
Obtained from:	Illumos commit 13442:4adbe6de60c8 (+ local changes)
MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238168 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
r237748 continuation: fix nopw (0f 1f) behavior with respect to modifiers

To do: proper merge with Illumos vendor area.

Reported by:	emaste
Tested by:	emaste
Obtained from:	Illumos commit 13442:4adbe6de60c8
MFC after:	5 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238169 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Also report tx bandwidth with Ethernet overhead


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238170 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix typo in the comment.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238171 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
agp.c:
Don't use Maxmem when the amount of memory is meant. Use realmem instead.
Maxmem is not only a MD variable, it represents the highest physical memory
address in use. On systems where memory is sparsely layed-out the highest
memory address and the amount of memory are not interchangeable. Scaling the
AGP aperture based on the actual amount of memory (= realmem) rather than
the available memory (= physmem) makes sure there's consistent behaviour
across architectures.

agp_i810.c:
While arguably the use of Maxmem can be considered correct, replace its use
with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which
have a dense physical memory layout. Avoiding Maxmem here is done with an
eye on copy-n-paste behaviour in general and to avoid confusion caused by
using realmem in agp.c and Maxmem in agp_i810.c.

In both cases, remove the inclusion of md_var.h


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238172 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Fix issue resizing bin/sh

This partially reverts some changes from r237448 that are causing
breakage when resizing under bin/sh .

Reverted changes from NetBSD are:

Mar 10 20:46:15 2009 - editline.3 read.c
make el_gets set the count to -1 on error to distinguish between EOF and
error.

Feb 19 15:20:22 2009 - read.c sig.c sig.h
reset and redraw on sigcont. From Anon Ymous.

Feb 15 21:24:13 2009
don't restart on EINTR, instead return NULL immediately. From Anon Ymous

PR:		169603
Reported by:	Peter Jeremy, David Shao
MFC after:	3 days


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238173 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Allow continuous packet transmission (via -t 0)

Also add a missing check for the cancel flag while waiting for the first
packet in receive mode.


git-svn-id: svn+ssh://svn.freebsd.org/base/head@238175 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Merge a small update from NetBSD.

Feb 15 21:55:23 2009 - chared.c chared.h
pass lint on _LP64.

MFC after:	1 week


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