Vendor import of byacc 20120526

Approved by:	des (mentor, implicit)
Import byacc 20130304
Fix condition that determines PMAP_NEEDS_PTE_SYNC value for ARM

Use values of the correct defines to determine statement's result.
ARM_ARCH_ symbols are always defined, hence only values are relevant.

Reviewed by:	cognet
Add support for PCI-to-ISA LPC bridge emulation. If the LPC bus is attached
to a virtual machine then we implicitly create COM1 and COM2 ISA devices.

Prior to this change the only way of attaching a COM port to the virtual
machine was by presenting it as a PCI device that is mapped at the legacy
I/O address 0x3F8 or 0x2F8.

There were some issues with the original approach:
- It did not work at all with UEFI because UEFI will reprogram the PCI device
  BARs and remap the COM1/COM2 ports at non-legacy addresses.
- OpenBSD GENERIC kernel does not create a /dev/console because it expects
  the uart device at the legacy 0x3F8/0x2F8 address to be an ISA device.
- It was functional with a FreeBSD guest but caused the console to appear
  on /dev/ttyu2 which was not intuitive.

The uart emulation is now independent of the bus on which it resides. Thus it
is possible to have uart devices on the PCI bus in addition to the legacy
COM1/COM2 devices behind the LPC bus.

The command line option to attach ISA COM1/COM2 ports to a virtual machine is
"-s <bus>,lpc -l com1,stdio".

The command line option to create a PCI-attached uart device is:
"-s <bus>,uart[,stdio]"

The command line option to create PCI-attached COM1/COM2 device is:
"-S <bus>,uart[,stdio]". This style of creating COM ports is deprecated.

Discussed with:	grehan
Reviewed by:	grehan
Submitted by:	Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

M    share/examples/bhyve/vmrun.sh
AM   usr.sbin/bhyve/legacy_irq.c
AM   usr.sbin/bhyve/legacy_irq.h
M    usr.sbin/bhyve/Makefile
AM   usr.sbin/bhyve/uart_emul.c
M    usr.sbin/bhyve/bhyverun.c
AM   usr.sbin/bhyve/uart_emul.h
M    usr.sbin/bhyve/pci_uart.c
M    usr.sbin/bhyve/pci_emul.c
M    usr.sbin/bhyve/inout.c
M    usr.sbin/bhyve/pci_emul.h
M    usr.sbin/bhyve/inout.h
AM   usr.sbin/bhyve/pci_lpc.c
AM   usr.sbin/bhyve/pci_lpc.h
Return NOKEY instead of 0 if there are no more key presses queued. This
worked by accident if and only if akbd was part of a kbdmux (which it
always was in practice).

MFC after:	1 week
Remove unnecessary includes of <machine/pmap.h>

Requested by:	alc@
Revert r257248 and fix the problem in a way that doesn't violate style(9).

Suggested by:	jmg
Digi-CCWMX53: enable ffec and uart.
Fix an off-by-one error when checking whether a given address is within
the extent of a symbol.

Submitted by:	Prashanth Kumar <pra_udupi@yahoo.co.in>
Reviewed by:	rpaulo
MFC after:	1 week
Fix the PLCP lookup code in iwn(4) to base the 11n decision on whether
the rate is 11n, rather than whether the channel is 11n.

This correctly allows the PLCP lookup code to return the legacy rates
even on an 11n channel.

PR:		kern/183430
binutils/bfd: fix printf-like format strings for "bfd *" arguments

There is a special format argument '%B' that directly handles values
of type 'bfd *', they must be used instead of '%s'.  Manifestations
of this bug can be seen in ld(1) error messages, for example,
  http://lists.freebsd.org/pipermail/freebsd-current/2013-August/043580.html
  http://lists.freebsd.org/pipermail/freebsd-current/2013-October/045404.html

Approved by:	dim
MFC after:	2 weeks
Add support for new Gigabit PHY of RealTek.
I don't have a copy of data sheet so I'm not sure exact PHY model
name. Vendor's web page indicates RTL8251 is latest PHY so I used
the name. This PHY is used with RTL8168G, RTL8168GU and RTL8411B.
Add preliminary support for RTL8168G, RTL8168GU and RTL8411B.
RTL8168GU has two variants(GMII and MII) but it uses the same chip
revision id.  Driver checks PCI device id of controller and
sets internal capability flag(i.e. jumbo frame and link speed down
in WOL).

H/W donated by:	RealTek Semiconductor Corp.
Add preliminary support for RTL8168EP.

Submitted by:	Edward O'Callaghan (eocallaghan <> alterapraxis dot com)
Fix regression introduced in r235816.
r235816 triggered kernel panic or hang after warm boot.
Don't blindly restore BCE_EMAC_MODE media configuration in
bce_reset().  If driver is about to shutdown it will invoke
bce_reset() which in turn results in restoring BCE_EMAC_MODE
media configuration.  This operation seems to confuse controller
firmware.

Reported by:	Paul Herman (herman <> cleverbridge dot com)
Tested by:	sbruno, Paul Herman (herman <> cleverbridge dot com)
Remove redundand declaration, fixing the build with gcc.

Reported and tested by:	Michael Butler <imb@protected-networks.net>
Sponsored by:	The FreeBSD Foundation
MFC after:	1 month
Import byacc version 20130925
Merge byacc 20130925

2 changes:
- Increase default stack-size so that used to be our default stack-size prior byacc import
- fix two loop-limits found by clang 3.3
Change warning level to 6
Setting WARNS=6 is useless, as it is already the default

Reported by:	Sascha Wildner