194214 Commits

Author SHA1 Message Date
ian
c44e255e08 MFC r257199, r257200, r257217:
Remove all #include <machine/pmap.h> from arm code.  It's already
  included by vm/pmap.h, which is a prerequisite for arm/machine/pmap.h
  so there's no reason to ever include it directly.

  Remove #include <machine/frame.h> from all the arm code that doesn't
  really need it.  That would be almost everywhere it was included.  Add
  it in a couple files that really do need it and were previously getting
  it by accident via another header.

  Remove the last dregs of trapframe_t.  It turns out only arm was using
  this type, so remove it to make arm code more consistant with other
  platforms.
2013-12-13 20:43:11 +00:00
trasz
a82d470c95 MFC r256724:
Make geom_label(4) resize-aware.  This fixes a situation when "gpart resize"
would resize a partition, but label providers - e.g. /dev/gptid/XXX - would
stay the same size.

MFC r256766:

Fix build with gcc by spelling unused format string as "unused" instead of NULL.

Sponsored by:	The FreeBSD Foundation
2013-12-13 20:33:59 +00:00
pfg
39d7d288c5 MFV r258571:
Removes strict-aliasing warnings from newer GCC in tcpdump.

Corresponds to MFC r258573, but for some reason our new pre-commit hooks
will not let us merge it from there.
2013-12-13 19:32:02 +00:00
ian
79d2bad50b MFC r257062: Add the Raspberry Pi SPI controller driver. 2013-12-13 19:27:23 +00:00
ian
733bb57871 MFC r256949: Import basic support for Rockchip RK3188 SoC. 2013-12-13 19:17:09 +00:00
ian
180cdddb95 MFC r257480:
Convert the if/else list of compatible devices to the table-driven
  ofw_bus_search_compatible() routine.  In addition to converting existing
  strings to table entries, also add compat strings for the whole imx family.
2013-12-13 19:01:50 +00:00
ian
c34a108500 MFC r257197:
Maximize available kva space by doing static device mapping from the top
  of the address space downwards, and then returning the lowest mapped
  device address from initarm_lastaddr().  Premap most of the device's
  on-chip peripherals.
2013-12-13 18:26:22 +00:00
pfg
c659dd08b2 MFC r258115 (partial);
gperf: bring a small update from Apple Developers tools 4.4

From [1]

offset.patch
Makes use the C offsetof() macro.

We are not merging the size_type.patch as it raises some
(apparently) bogus warnings and is not really used.

[1] http://opensource.apple.com/source/gperf/gperf-9/patches/
2013-12-13 18:23:14 +00:00
ian
3270502674 MFC r256815:
Calculate the baud rate divisor rather than using a hard-coded value.
2013-12-13 18:21:27 +00:00
ian
66e5b415b9 MFC r256809: Add configuration for the Freescale i.MX53 Quick Start Board. 2013-12-13 17:29:31 +00:00
ian
fb7e8e2d67 MFC r256806, r256919, r257167:
Add a driver for the Freescale Fast Ethernet Controller found on various
  Freescale SoCs including the i.MX series.  This also works for the newer
  SoCs with the ENET gigabit controller, but doesn't use any of the new
  hardware features other than enabling gigabit speed.

  Mask out non-address bits in the mac address register, for proper
  detection of an all-zeroes address.  Also remove a misplaced return.

  Switch to using ofw_bus_search_compatible() table-driven compat lookup.
  Add compat strings for Freescale Vybrid family SoCs.
2013-12-13 17:28:08 +00:00
ian
366fb50b48 MFC r257130:
Add a helper routine to search for a compat string in a table that
  associates compat strings with arbitrary values that mean something to
  the driver.  This is handy for drivers that support several variations
  of similar hardware and need to know which one matched.
2013-12-13 17:23:47 +00:00
ian
8f39a8efa7 MFC r256804:
Switch to using the standard uart console driver instead of the special
  driver for early boot debugging.
2013-12-13 17:10:23 +00:00
ian
4d06787a45 MFC r256774:
Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.
2013-12-13 17:03:32 +00:00
ian
de1f089de5 MFC r256647:
Invalidate the entire L2 cache before enabling it.  Say whether it
  has been enabled or disabled.
2013-12-13 17:02:09 +00:00
ian
be8c9bf1f0 MFC 256640: Allow 'make xdev' to work when DESTDIR is set. 2013-12-13 17:00:25 +00:00
asomers
7779917bec MFC 257006
sbin/geom/class/part/geom_part.c
        Always validate the return of find_geomcfg().  It could be NULL, for
        example when the geom is withering.

Approved by:    ken (mentor)
Sponsored by:   Spectra Logic Corporation
2013-12-13 16:55:39 +00:00
ian
8fd0a81f51 MFC r256638:
Add cases for the combinations of busdma sync op flags that we handle
  correctly by doing nothing, then add a panic for the default case, because
  that implies that some driver asked for a sync (probably incorrectly) and
  nothing was done.
2013-12-13 16:41:04 +00:00
ian
39a72e06bf MFC r256637:
When calculating the number of bounce pages needed, round the maxsize
  up to a multiple of PAGE_SIZE, and add one page because there can always
  be one more boundary crossing than the number of pages in the transfer.
2013-12-13 16:38:21 +00:00
ian
f6a96c9d56 MFC r256628:
Fix a register name typo.  The effect was that CPU_CONTROL_AFLT_ENABLE
  wasn't being set, but it was almost assuredly already turned on anyway
  by the bootloader.
2013-12-13 16:14:08 +00:00
ian
027002080b MFC r256492:
Add the long-missing spibus_if.m to the MFILES list.
2013-12-13 16:09:07 +00:00
trasz
30ec0085c3 MFC r259183:
Properly refuse handoff requests on already connected sessions.  Previously
this would result in dropping the session.

Sponsored by:	The FreeBSD Foundation
2013-12-13 15:25:51 +00:00
trasz
77844c8786 MFC r259182:
Fix handling for empty auth-groups.  Without it, ctld child process
would either exit on assertion, or, if assertions are not enabled,
fail to authenticate the target.

Sponsored by:	The FreeBSD Foundation
2013-12-13 15:23:07 +00:00
trasz
61fa4c178c MFC r258871:
Properly report an error instead of panicing when user tries to create
LUN backed by non-disk device, e.g. /dev/null.

Sponsored by:	The FreeBSD Foundation
2013-12-13 15:19:37 +00:00
rmh
b7083b9dca MFC r259003:
Initialize modesetting sysctls in radeonkms.
2013-12-13 13:17:59 +00:00
grehan
3f29e37aef MFC r256657,r257018,r257347,r257423,r257729,r257767,
r257933,r258609,r258614,r258668,r258673,r258855

Pull in some minor bugfixes and functionality enhancements
from CURRENT. These are candidates to be moved to 10.0-release.

r258855
mdoc: quote string properly.

r258673
Don't create an initial value for the host filesystem of "/".

r258668
Allow bhyve and bhyveload to attach to tty devices.

r258614
The 22-bit Data Byte Count (DBC) field of a Physical Region Descriptor was
being read as a 32-bit quantity by the bhyve AHCI driver.

r258609
Fix discrepancy between the IOAPIC ID advertised by firmware tables and the
actual value read by the guest.

r257933
Route the legacy timer interrupt (IRQ0) to pin 2 of the IOAPIC.

r257767
Fix an off-by-one error when iterating over the emulated PCI BARs.

r257729
Add the VM name to the process name with setproctitle().

r257423
Make the virtual ioapic available unconditionally in a bhyve virtual machine.

r257347
Update copyright to include the author of the LPC bridge emulation code.

hand-merge r257018
Tidy usage messages for bhyve and bhyveload.

r256657
Add an option to bhyveload(8) that allows setting a loader environment variable
from the command line.

Discussed with:	neel
2013-12-13 06:59:18 +00:00
kib
37e02e5c7a MFC r258367:
Verify for zero-length requests and act as if it is always successfull
without performing any action on the address space.
2013-12-13 06:28:18 +00:00
kib
acce26c3d9 MFC r258366:
Add assertions to cover all places in the wiring and unwiring code
where MAP_ENTRY_IN_TRANSITION is set or cleared.
2013-12-13 06:25:08 +00:00
kib
f79abc87df MFC r257899:
If filesystem declares that it supports shared locking for writes, use
shared vnode lock for VOP_PUTPAGES() as well.
2013-12-13 06:12:21 +00:00
kib
b642c1ba22 MFC r257904:
Hide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef
_KERNEL braces.  Struct mount is only defined for the kernel build.
2013-12-13 06:10:49 +00:00
kib
d296e566a2 MFC r257898:
Change VFS_PROLOGUE() to evaluate the mp once, convert
MNTK_SHARED_WRITES and MNTK_EXTENDED_SHARED tests into inline functions.
2013-12-13 06:09:19 +00:00
kib
c4e5b24a25 MFC r259044:
For variant II static TLS, properly align tls segments.

MFC r259072:
Cast Elf_Addr to void * to match the free_aligned() argument type.
2013-12-13 06:06:08 +00:00
kib
d22cb2f95e MFC r259043:
Build an allocator for the aligned memory on top of the rtld-private
malloc.
2013-12-13 06:00:44 +00:00
kib
a455348768 MFC r259042:
Do not force to run atexit handlers, which text comes from a dso owning
the handle passed to __cxa_finalize() but which are registered by other
dso, when the process is inside exit(3).
2013-12-13 05:54:30 +00:00
eadler
82cc6046d5 MFC r259156:
mtest(8): use correct macro in mdoc

	The An macros is used for authors while the Ar macro is used for arguments.
	AFAIK mcast-addr and ifname are not authors.

PR:		docs/184649
2013-12-13 00:56:05 +00:00
rodrigc
baf65b8b8d MFC r259274
Mention BIND removal in release notes.

Submitted by: skreuzer
2013-12-12 21:51:33 +00:00
pfg
b8648b775a MFC r258712;
libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from:	OpenBSD (Rev 1.2)
MFC after:	2 weeks
2013-12-12 19:01:50 +00:00
pfg
4bda5ad442 MFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
r258206, r258207, r258321

This is a series of commits inspired on Google's gcc-4.2.1 for
Android that were taken from the gcc pre-4.3 under the GPLv2.

gcc: Backport fixes for -W parentheses in C++
	This fixes GCC 19564.
gcc: merge rs6000 change from FSF pre-gcc43
	Don't set MASK_PPC_GFXOPT for 8540 or 8548.
Merge vrp-tree fix from gcc-4.3
	Fix missed conversion from / to >> (GCC PR32521)
Merge in GCCr120505 to include definition of TREE_OVERFLOW_P
gcc: warn about integer overflow in constant expressions in the C++ frontend.
gcc: Add a new option -Wvla to warn variable length array.
libcpp: preprocessor speedup patches from upstream gcc.
gcc: add femit-struct-debug support to reduce Reduce dwarf debug size
gcc: Fix postreload-gcse treatment of call-clobbered registers.
gcc: Record some previous commits in the ChangeLog.gcc43 file.
2013-12-12 18:15:32 +00:00
andreast
465403a5cc MFC: r258427, r258694
r258694:
Make RTAS calls, which call setfault() to recover from machine checks,
preserve any existing fault buffer. RTAS calls are meant to be safe from
interrupt context (and are indeed used there to implement the xics PIC
driver). Without this, calling into RTAS in interrupt context would have
the effect of clearing any existing onfault state of the interrupted
thread, potentially leading to a panic.

r258427:
For PCI<->PCI bridges, #address-cells may be 3. Allow this when parsing the
ibm,dma-window properties. This is especially a concern when
#ibm,dma-address-cells is not specified and we have to use the regular
#address-cells property.
2013-12-12 13:00:07 +00:00
andreast
caaf223f40 MFC: r258051, r258052
r258052:
Following the approach with ACPI DMAR on x86, split IOMMU handling into
a variant PCI bus instead of trying to shoehorn it into the PCI host bridge
adapter. Besides matching better the architecture on other platforms, this
also allows systems with multiple partitionable endpoints per PCI host
bridge to work correctly.

r258051:
Actually add IOMMU domain to the list of known mappings. This fixes a bug
where multiple devices in the same IOMMU domain would be allocated
conflicting mappings unless they also shared a DMA tag.
2013-12-12 12:36:40 +00:00
andreast
14be275758 MFC: r258722, r258757
r258722:
Give some output about the CPU clock on IBMPOWER machines, currently read
from OF. Linux does it similar, means they also read the OF values and
display them.
r258757:
Use the Open Firmware-based CPU frequency determination as a generic
fallback if we can't measure CPU frequency. This is also useful on a
variety of embedded systems using FDT.
2013-12-12 12:29:35 +00:00
andreast
8843b343e6 MFC: r256932, r256938, r256953
r256932:
Add a new function (OF_getencprop()) that undoes the transformation applied
by encode-int. Specifically, it takes a set of 32-bit cell values and
changes them to host byte order. Most non-string instances of OF_getprop()
should be using this function, which is a no-op on big-endian platforms.

r256938:
A few other common cases for encode-int decoding: OF_getencprop_alloc()
and OF_searchencprop(). I thought about using the element size parameter
to OF_getprop_alloc() to do endian-switching automatically, but it breaks
use with structs and a *lot* of FDT code (which can hopefully be moved to
these new APIs).

r256953:
Fix build.
2013-12-12 12:17:20 +00:00
mdf
cf9afebc6a MFC r258658:
Fix a segfault / internal compiler error.

Among other causes, when gcc throws a warning before parsing any tokens,
the cur_token pointer is at the beginning of malloc'd memory.
Dereferencing cur_token[-1] can cause a segfault.

Code taken from OpenBSD
http://www.openbsd.org/cgi-bin/cvsweb/src/gnu/gcc/libcpp/errors.c
which was a more complete fix than the one I originally coded.
2013-12-12 02:03:42 +00:00
np
346b651e7c MFC r259145:
Unstaticize t4_list and t4_uld_list.  This works around a clang
annoyance[1] and allows kgdb to find these symbols.

[1] http://lists.freebsd.org/pipermail/freebsd-hackers/2012-November/041166.html
2013-12-12 00:27:27 +00:00
rmacklem
6d1eed3f40 MFC: r257901
Fix an NFSv4.1 client specific case where a forced dismount would hang.
The hang occurred in nfsv4_setsequence() when it couldn't find an
available session slot and is fixed by checking for a forced dismount
in progress and just returning for this case.
2013-12-11 23:28:31 +00:00
dumbbell
89f39922ee MFC r258930:
drm: Read PCIER_LINK_CAP/PCIER_LINK_CAP2 from the PCI bridge

Before this fix, capabilities were read from vgapci and were incorrect.
2013-12-11 23:15:19 +00:00
dumbbell
91ba4c72da MFC r259104:
drm/radeon: radeon_dp_i2c_aux_ch() must return 0 on FreeBSD

The code was unmodified compared to Linux and returned the amount of
received bytes from the i2c bus. This led to non-working i2c bus and
failure to eg. read monitor's EDID, if connected to DisplayPort.

Tested by:	Mikaël Urankar <mikael.urankar@gmail.com>
2013-12-11 23:06:03 +00:00
andreast
66bcaa96d6 MFC r257991, r257992, 257993, 258504
r257991:
  Consolidate Apple firmware hacks and improve them by switching on the
  presence of mac-io devices in the tree, which uniquely identifies Apple
  hardware.

r257992:
  Allow OF_decode_addr() to also be able to map resources on big-endian
  devices. To this end, make PCI device detection rely on the device_type
  field rather than name, as per the standard.

r257993:

  Make tsec work with the device tree present on the RB800. The previous code
  assumed that the MDIO bus was a direct child of the Ethernet interface. It
  may not be and indeed on many device trees is not. While here, add proper
  locking for MII transactions, which may be on a bus shared by several MACs.

r258504:

  Save and restore the trap vectors when doing OF calls on pSeries machines.

  It turned out that on pSeries machines the call into OF modified the trap
  vectors and this made further behaviour unpredictable.

  With this commit I'm now able to boot multi user on a network booted
  environment on my IntelliStation 285. This is a POWER5+ machine.
2013-12-11 22:36:20 +00:00
dumbbell
50221324bd MFC r259101:
drm/radeon: agp_info->ai_aperture_size is in bytes, not Mbytes

This fixes radeon_agp_init() and gtt_size is now correct. However, this
is not enough to make Radeon AGP cards work: ttm_agp_backend.c isn't
implemented yet.

Submitted by:	tijl@
2013-12-11 22:26:09 +00:00
andreast
7990e5891f MFC r259007
Increase PHYS_AVAIL_SZ because on pSeries machines we can have many logical
regions which represent the total amount of memory. The size of these regions
is not the physical size of the chip but it is a logical one and it is given
by the OpenFirmware, it is selectable at boot time and varies between 16MB and
256MB in my case. There is an 'automatic' option which would select the size as
64MB in case you have around 16GB of RAM.
To make sure we can allocate RAM with the automatic option bump this value
of PHYS_AVAIL_SZ to 256.
2013-12-11 22:00:03 +00:00