]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
10 years agoMFC r259286,259424,259425:
bjk [Mon, 16 Dec 2013 02:04:28 +0000 (02:04 +0000)]
MFC r259286,259424,259425:
  Apply patch from upstream Heimdal for encoding fix

  RFC 4402 specifies the implementation of the gss_pseudo_random()
  function for the krb5 mechanism (and the C bindings therein).
  The implementation uses a PRF+ function that concatenates the output
  of individual krb5 pseudo-random operations produced with a counter
  and seed.  The original implementation of this function in Heimdal
  incorrectly encoded the counter as a little-endian integer, but the
  RFC specifies the counter encoding as big-endian.  The implementation
  initializes the counter to zero, so the first block of output (16 octets,
  for the modern AES enctypes 17 and 18) is unchanged.  (RFC 4402 specifies
  that the counter should begin at 1, but both existing implementations
  begin with zero and it looks like the standard will be re-issued, with
  test vectors, to begin at zero.)

  This is upstream's commit f85652af868e64811f2b32b815d4198e7f9017f6,
  from 13 October, 2013:
  % Fix krb5's gss_pseudo_random() (n is big-endian)
  %
  % The first enctype RFC3961 prf output length's bytes are correct because
  % the little- and big-endian representations of unsigned zero are the
  % same.  The second block of output was wrong because the counter was not
  % being encoded as big-endian.
  %
  % This change could break applications.  But those applications would not
  % have been interoperating with other implementations anyways (in
  % particular: MIT's).

Bump __FreeBSD_version accordingly and add a note in UPDATING.

Approved by: hrs (mentor, src committer)

git-svn-id: svn://svn.freebsd.org/base/stable/10@259447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoRecord r258428 and r258445 as not merged.
peter [Mon, 16 Dec 2013 01:47:52 +0000 (01:47 +0000)]
Record r258428 and r258445 as not merged.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259445 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259132,r259133,r259143:
eadler [Mon, 16 Dec 2013 01:20:18 +0000 (01:20 +0000)]
MFC r259132,r259133,r259143:
Per the resolution of POSIX bug 0000779 (note 0002050) add support for using 'i'
as a case insensitive flag.

Add regression test for recently added 'i' flag in r259132.

the i modifier was added in r259132 since POSIX recently agreed to add
it. Switch uses of /I to /i.

PR: standards/184641

git-svn-id: svn://svn.freebsd.org/base/stable/10@259443 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258530;
pfg [Sun, 15 Dec 2013 04:27:49 +0000 (04:27 +0000)]
MFC r258530;

libcpp: Keep a record of changes from upstream GCC (pre-43).

git-svn-id: svn://svn.freebsd.org/base/stable/10@259408 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC rr258501, r258507;
pfg [Sun, 15 Dec 2013 03:47:31 +0000 (03:47 +0000)]
MFC rr258501, r258507;
gcc: Bring updates from Google's enhanced gcc-4.2.1.

Google released and enhanced version of gcc-4.2.1 plus their local
patches for Android[1].

The patches are owned by Google and the license hasn't been changed
from  the original GPLv2. We are only bringing a subset of the
available patches that may be helpful in FreeBSD, in other words,
changes specific to android are not included.

From the README.google file[1].

Patches applied to google_vendor_src_branch/gcc/gcc-4.2.1:

gcc/Makefile.in
gcc/c-common.c
gcc/c-common.h
gcc/c-opts.c
gcc/c-typeck.c
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/opts.c
gcc/tree-flow.h
gcc/tree-ssa-alias-warnings.c
gcc/tree-ssa-alias.c

 Backport of -Wstrict-aliasing from mainline.
  Silvius Rus <rus@google.com>

gcc/coverage.c:
  Patch coverage_checksum_string for PR 25351.
  Seongbae Park <spark@google.com>
  Not yet submitted to FSF.

gcc/c-opts.c
gcc/c-ppoutput.c
gcc/c.opt
gcc/doc/cppopts.texi
libcpp/Makefile.in
libcpp/directives-only.c
libcpp/directives.c
libcpp/files.c
libcpp/include/cpplib.h
libcpp/init.c
libcpp/internal.h
libcpp/macro.c
  Support for -fdirectives-only.
  Ollie Wild <aaw@google.com>.
  Submitted to FSF but not yet approved.

libstdc++-v3/include/ext/hashtable.h
  http://b/742065
  http://b/629994
  Reduce min size of hashtable for hash_map, hash_set from 53 to 5

libstdc++-v3/include/ext/hashtable.h
  http://b/629994
  Do not iterate over buckets if hashtable is empty.

gcc/common.opt
gcc/doc/invoke.texi
gcc/flags.h
gcc/gimplify.c
gcc/opts.c
  Add Saito's patch for -finstrument-functions-exclude-* options.

gcc/common.opt
gcc/doc/invoke.texi
gcc/final.c
gcc/flags.h
gcc/opts.c
gcc/testsuite/gcc.dg/Wframe-larger-than.c
  Add a new flag -Wframe-larger-than- which enables a new warning
  when a frame size of a function is larger than specified.
  This patch hasn't been integrated into gcc mainline yet.

gcc/tree-vrp.c
  Add a hack to avoid using ivopts information for pointers starting
  at constant values.

Reference:

[1]
https://android.googlesource.com/toolchain/gcc/+/master/gcc-4.2.1/

Obtained from: Google Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259405 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259400:
gjb [Sat, 14 Dec 2013 22:43:30 +0000 (22:43 +0000)]
MFC r259400:
  Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail,
  and atf.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@259401 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256430:
gjb [Sat, 14 Dec 2013 22:39:01 +0000 (22:39 +0000)]
MFC r256430:
  Reduce disc1.iso image size by installing the userland with
  the WITHOUT_PROFILE=1 option set, trimming 56MB from the image.

This change was somehow lost during the 10.0-RELEASE cycle, and
is intended for MFC to releng/10.0.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@259399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259113, r259115, r259144, r259148:
gjb [Sat, 14 Dec 2013 20:55:53 +0000 (20:55 +0000)]
MFC r259113, r259115, r259144, r259148:

r259113 (dteske):
  Fix failed attempt to send pkg(8) stderr to /dev/null

r259115 (dteske):
  Prevent truncating /tmp/bsdinstall_log each time we
  exec a module.

r259144 (dteske):
  Fix a regression after successfully installing to encrypted
  ZFS root, the passphrase is not accepted and a message about
  "incorrect key" is displayed.

r259148 (dteske):
  Fix a regression resulting in mountroot prompt after attempting
  to install to encrypted ZFS root (caused by a typo in a
  variable name -- ZFSBOOT_BOOT_FSNAME -> ZFSBOOT_BOOTFS_NAME).

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@259396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257987:
ae [Sat, 14 Dec 2013 04:24:32 +0000 (04:24 +0000)]
MFC r257987:
  Initialize prot variable.

  PR: 177417

git-svn-id: svn://svn.freebsd.org/base/stable/10@259385 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257965:
ae [Sat, 14 Dec 2013 04:16:27 +0000 (04:16 +0000)]
MFC r257965:
  Add missing line breaks.

  PR: 181900

git-svn-id: svn://svn.freebsd.org/base/stable/10@259383 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259212, r259220:
ian [Sat, 14 Dec 2013 01:35:57 +0000 (01:35 +0000)]
MFC r259212, r259220:

  Fix one race and one fence post error. When the TX buffer was
  completely full, we'd not complete any of the mbufs due to the fence
  post error (this creates a large leak). When this is fixed, we still
  leak, but at a much smaller rate due to a race between ateintr and
  atestart_locked as well as an asymmetry where atestart_locked is
  called from elsewhere.  Ensure that we free in-flight packets that
  have completed there as well. Also remove needless check for NULL on
  mb, checked earlier in the loop and simplify a redundant if.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259381 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259038, r259039:
ian [Sat, 14 Dec 2013 01:34:24 +0000 (01:34 +0000)]
MFC r259038, r259039:

  Bump the maximum VM space from 3 * memory size to a fixed
  256MB. That's all we have room for since we map the hardware registers
  starting at 0xd0000000. This allows my 64MB AT91SAM9G20 to boot again
  after the unmmaped I/O changes were MFC'd at r251897. Other
  subplatforms may need similar treatment.

  Although not strictly required to boot a 64MB board, bump
  vm_max_virtual_address to be KERNVIRTADDR + 256MB. This allows some
  future shock protection since the KVA requirements have gone up since
  the unmapped changes have gone in, as well as preventing us from
  overlapping with the hardware devices, which we map at 0xd0000000,
  which we'd hit with anything more than 85MB...

git-svn-id: svn://svn.freebsd.org/base/stable/10@259380 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258828:
ian [Sat, 14 Dec 2013 01:15:26 +0000 (01:15 +0000)]
MFC r258828:

  Add a nand flash controller driver for Atmel at91 family.  Tested only
  on at91rm9200 so far.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259379 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258820: Add definitions for the PIO pins found on recent AT91 SoCs.
ian [Sat, 14 Dec 2013 01:14:38 +0000 (01:14 +0000)]
MFC r258820:  Add definitions for the PIO pins found on recent AT91 SoCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259378 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258392, r258412:
ian [Sat, 14 Dec 2013 01:12:13 +0000 (01:12 +0000)]
MFC r258392, r258412:

  Call cpu_setup() immediately after the page tables are installed.  This
  enables data cache and other chip-specific features.  It was previously
  done via an early SYSINIT, but it was being done after pmap and vm setup,
  and those setups need to use mutexes.  On some modern ARM platforms,
  the ldrex/strex instructions that implement mutexes require the data cache
  to be enabled.

  Call cpu_setup() from the initarm() routine on platforms that don't use
  the common FDT-aware initarm() in arm/machdep.c.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259377 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258393:
ian [Sat, 14 Dec 2013 00:59:40 +0000 (00:59 +0000)]
MFC r258393:

  Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259375 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258356:
ian [Sat, 14 Dec 2013 00:58:13 +0000 (00:58 +0000)]
MFC r258356:

  Bugfixes... the host capabilties from FDT data are stored in host.caps, not
  host.host_ocr, examine the correct field when setting up the hardware.  Also,
  the offset for the capabilties register should be 0x140, not 0x240.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258240:
ian [Sat, 14 Dec 2013 00:57:05 +0000 (00:57 +0000)]
MFC r258240:

  In the data abort handler, don't panic if kdb is available and says it
  handled the condition.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259373 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258740:
ian [Sat, 14 Dec 2013 00:55:34 +0000 (00:55 +0000)]
MFC r258740:

  Look up a nand chip by id in the static table before trying to obtain
  ONFI parameters.  This allows a static table entry to provide valid data
  for chips known to provide invalid ONFI data.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259372 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257892, r258196, r258197, r258199, r258200, r258201, r258202:
ian [Sat, 14 Dec 2013 00:54:05 +0000 (00:54 +0000)]
MFC r257892, r258196, r258197, r258199, r258200, r258201, r258202:

  Add ONFI signature check.

  Add Micron chip found in Freescale Vybrid Family Phytec COSMIC board.

  The vendor specified field is 88 bytes, not 8 bytes.

  Update the onfi_params struct to ONFI revision 3.2 (06 12 2013).

  Search for and validate the ONFI params as specified in the standard.

  ONFI parameters are little-endian, hence we must take care to convert them
  to native endianness.  We must also pay attention to unaligned accesses.

  Rework the routine that returns a pointer to the table of software ECC
  byte positions within the OOB area to support chips with unusual OOB
  sizes such as 218 or 224 bytes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258076, r258077:
ian [Sat, 14 Dec 2013 00:25:57 +0000 (00:25 +0000)]
MFC r258076, r258077:

  This fixes 3 problems in syslogd related to sizing receive buffers...

  - A call was misplaced at the wrong level of nested if blocks, so that
    the buffers for unix domain sockets (/dev/log, /dev/klog) were never
    increased at all; they remained at a way-too-small default size of 4096.

  - The function that was supposed to double the size of the buffer
    sometimes did nothing, and sometimes installed a wildly-wrong buffer
    size (either too large or too small) due to an unitialized 'slen'
    variable passed to getsockopt().  Most often it doubled the UDP buffers
    from 40k to 80k because accidentally there would be harmless stack
    garbage in the unitialized variables.

  - The whole concept of blindly doubling a socket's buffer size without
    knowing what size it started at is a design flaw that has to be called a
    bug.  If the double_rbuf() function had worked at all (I.E., if the
    other two bugs didn't exist) this would lead to UDP sockets having an
    80k buffer while unix dgram sockets get an 8k buffer.  There's nothing
    about the problem being solved that requires larger buffers for UDP than
    for unix dgram sockets -- the buffering requirements are the same
    regardless of socket type.

  This change renames the double_rbuf() function to increase_rbuf() and
  increases the buffer size on all types of sockets to 80k.  80k was
  chosen only because it appears to be the size the original change was
  shooting for, and it certainly seems to be reasonably large (I might
  have picked 64k in the absence of any historical guidance).

  Add ENETUNREACH and EADDRNOTAVAIL to the list of errors that are potentially
  transient and shouldn't result in closing the socket and giving up forever.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259368 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257924:
ian [Sat, 14 Dec 2013 00:23:43 +0000 (00:23 +0000)]
MFC r257924:

  Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
  to be a constant integer suitable for use in a case label, so use #defines.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259366 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257669, r257672, r257673, r257676, r257678:
ian [Sat, 14 Dec 2013 00:16:08 +0000 (00:16 +0000)]
MFC r257669, r257672, r257673, r257676, r257678:

  Call initarm_lastaddr() later in the init sequence, after establishing
  static device mappings, rather than as the first of the initializations
  that a platform can hook into.  This allows a platform to allocate KVA
  from the top of the address space downwards for things like static device
  mapping, and return the final "last usable address" result after that and
  other early init work is done.

  Because some platforms were doing work in initarm_lastaddr() that needs to
  be done early, add a new initarm_early_init() routine and move the early
  init code to that routine on those platforms.

  Make PTE_DEVICE a synonym for PTE_NOCACHE on armv4, to make it easier to
  share the same code on both architectures.

  Add new helper routines for arm static device mapping.  The new code
  allocates kva space from the top down for the device mappings and builds
  entries in an internal table which is automatically used later by
  arm_devmap_bootstrap().  The platform code just calls the new
  arm_devmap_add_entry() function as many times as it needs to (up to 32
  entries allowed; most platforms use 2 or 3 at most).

  Remove imx local devmap code and use the essentially identical common
  code that got moved from imx_machdep.c to arm/devmap.c.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257648, r257649, r257660:
ian [Fri, 13 Dec 2013 23:56:53 +0000 (23:56 +0000)]
MFC r257648, r257649, r257660:

  Begin reducing code duplication in arm pmap.c and pmap-v6.c by factoring
  out common code related to mapping device memory into a new devmap.c file.

  Remove the growing duplication of code that used pmap_devmap_find_pa() and
  then did some math with the returned results to generate a virtual address,
  and likewise in reverse to get a physical address.  Now there are a pair
  of functions, arm_devmap_vtop() and arm_devmap_ptov(), to do that.  The
  bus_space_map() implementations are rewritten in terms of these.

  Move remaining code and data related to static device mapping into the
  new devmap.[ch] files.  Emphasize the MD nature of these things by using
  the prefix arm_devmap_ on the function and type names (already a few of
  these things found their way into MI code, hopefully it will be harder to
  do by accident in the future).

git-svn-id: svn://svn.freebsd.org/base/stable/10@259364 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257639:
ian [Fri, 13 Dec 2013 23:07:22 +0000 (23:07 +0000)]
MFC r257639:

  Remove the duplicated implementations of some bus_space functions and use
  the essentially identical generic implementations instead.  The generic
  implementations differ only in the spelling of a couple variable names
  and some formatting differences.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259363 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257603, r257604:
ian [Fri, 13 Dec 2013 22:52:59 +0000 (22:52 +0000)]
MFC r257603, r257604:

  Rename WANDBOARD-COMMON to WANDBOARD.common and adjust the configs that
  include it accordingly.  The build machinery for universe and tinderbox
  tries to build every kernel config whose name begins and ends with [A-Z0-9]
  and the common include file that has most of the options isn't buildable
  by itself, so the new lowercase .common will avoid building it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259361 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257595: Comments and style(9) only, no functional changes.
ian [Fri, 13 Dec 2013 22:51:09 +0000 (22:51 +0000)]
MFC r257595:  Comments and style(9) only, no functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257561:
ian [Fri, 13 Dec 2013 22:50:12 +0000 (22:50 +0000)]
MFC r257561:

  Bugfix:  the attach routine needs to use the same table of fdt compat
  strings that the probe routine used.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259359 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257557: Add a missing register definition.
ian [Fri, 13 Dec 2013 22:49:18 +0000 (22:49 +0000)]
MFC r257557:  Add a missing register definition.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257556:
ian [Fri, 13 Dec 2013 22:48:01 +0000 (22:48 +0000)]
MFC r257556:

  Arrange for uart_cpu_fdt's probe() routine to use the same table of compat
  strings as uart_bus_fdt's probe().

git-svn-id: svn://svn.freebsd.org/base/stable/10@259357 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257518, r257519:
ian [Fri, 13 Dec 2013 22:46:10 +0000 (22:46 +0000)]
MFC r257518, r257519:

  TI sdhci driver improvements, mostly related to fdt data...

  Use the published compatible strings (our own invention, "ti,mmchs" is
  still accepted as well, for now).

  Don't blindly turn on 8-bit bus mode, because even though the controller
  supports it, the board has to be wired appropriately as well.  Use the
  published property (bus-width=<n>) and honor all the valid values (1,4,8).

  The eMMC device on a Beaglebone Black is wired for 8-bit, update the dts.

  The mmchs controller can inherently do both 1.8v and 3.0v on the first
  device and 1.8v only on other devices, unless an external transceiver is
  used.  Set the voltage automatically for the first device and honor
  the published fdt property (ti,dualvolt) for other devices.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259356 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257483, r257486, r257489:
ian [Fri, 13 Dec 2013 22:41:57 +0000 (22:41 +0000)]
MFC r257483, r257486, r257489:

  Add the Soc- / machine-dependent parts of imx6 support.
  Add dts source for imx6 SoCs and for Wandboard boards.
  Add kernel config for Wandboard.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259355 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257476, r257478:
ian [Fri, 13 Dec 2013 22:30:21 +0000 (22:30 +0000)]
MFC r257476, r257478:

  Revamp the SoC identity numbering scheme to be more in line with the way
  Freescale numbers the chips in the ID registers.

  Add definitions for the register and data that describes the SoC type.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259354 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257454: Add sdhci driver glue for imx family SoCs.
ian [Fri, 13 Dec 2013 22:28:19 +0000 (22:28 +0000)]
MFC r257454:  Add sdhci driver glue for imx family SoCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259353 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257453: Add stubbed-out imx6 support for clocks and power management.
ian [Fri, 13 Dec 2013 22:27:26 +0000 (22:27 +0000)]
MFC r257453:  Add stubbed-out imx6 support for clocks and power management.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259352 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257452: Add support for the USB PHY on imx6 SoCs.
ian [Fri, 13 Dec 2013 22:26:10 +0000 (22:26 +0000)]
MFC r257452:  Add support for the USB PHY on imx6 SoCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259351 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257419:
ian [Fri, 13 Dec 2013 22:24:00 +0000 (22:24 +0000)]
MFC r257419:

  Do not EOI an interrupt until the point after the filter handlers / before
  threaded handlers.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259349 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257418:
ian [Fri, 13 Dec 2013 22:22:54 +0000 (22:22 +0000)]
MFC r257418:

  Don't iterate through the bits of the pending interrupt register if the
  whole register is zero.  Most of the registers will be zero most of the time.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259348 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257413:
ian [Fri, 13 Dec 2013 22:21:49 +0000 (22:21 +0000)]
MFC r257413:

  Reset the timer interrupt status register at the top rather than bottom of
  the interrupt handler.  If the event callback starts a new short timeout,
  the timer can fire before returning from the event callback, and clearing
  the interrupt status after that loses the interrupt and hangs until the
  counter wraps.  Fixing all of this removes the need for the do-nothing
  loop at the top of the handler which really just waited for the counter to
  roll over and reach the one-shot count again.

  Also add a missing return(0) in the periodic timer start case.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259347 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257407:
ian [Fri, 13 Dec 2013 22:21:04 +0000 (22:21 +0000)]
MFC r257407:

  Expand the list of compatible devices this driver works with.  Increase
  the target frequency from 1 to 10 MHz because these SoCs are plenty fast
  enough to benefit from the extra event timer resolution.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259346 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257393:
ian [Fri, 13 Dec 2013 22:19:21 +0000 (22:19 +0000)]
MFC r257393:

  Rework the imx ehci driver so that it's four separate ehci units rather
  than one unit with four busses attached to it.  This allows us to use
  existing fdt data which describes separate devices with separate resources.
  It also allows any combination of the units to be en/disabled in the
  board dts files.

  Adjust our dts code to match what's used by linux and u-boot now that
  we're structured to do so.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259345 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257390: Add a vendor entry for Freescale Semiconductor.
ian [Fri, 13 Dec 2013 22:15:24 +0000 (22:15 +0000)]
MFC r257390:  Add a vendor entry for Freescale Semiconductor.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259344 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257383, r257384:
ian [Fri, 13 Dec 2013 22:12:37 +0000 (22:12 +0000)]
MFC r257383, r257384:

Add some bare-bones support for enabling usb and usbphy clocks.

Add a "no-op" USB PHY driver for imx-family SoCs.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259343 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257258, r257265: Include headers (if_var.h and others) where needed.
ian [Fri, 13 Dec 2013 22:08:31 +0000 (22:08 +0000)]
MFC r257258, r257265: Include headers (if_var.h and others) where needed.

The change that triggered the need for this on head was r257244.  That
hasn't been MFC'd yet, but there's no harm in paving the way for it with
this MFC.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259342 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256658, r256666:
rpaulo [Fri, 13 Dec 2013 21:57:44 +0000 (21:57 +0000)]
MFC r256658, r256666:

Move a lot of debugging printf's to DPRINTF.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259341 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257203: Eliminate a compiler warning about extraneous parens.
ian [Fri, 13 Dec 2013 21:41:40 +0000 (21:41 +0000)]
MFC r257203: Eliminate a compiler warning about extraneous parens.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259337 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257201, r257202
ian [Fri, 13 Dec 2013 21:40:12 +0000 (21:40 +0000)]
MFC r257201, r257202

  Retire arm_remap_nocache() and the data and constants associated with it.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259335 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoAdd mergeinfo for the MFC of r258573 done in r259326.
tijl [Fri, 13 Dec 2013 21:28:45 +0000 (21:28 +0000)]
Add mergeinfo for the MFC of r258573 done in r259326.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259334 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257199, r257200, r257217:
ian [Fri, 13 Dec 2013 20:43:11 +0000 (20:43 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259329 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256724:
trasz [Fri, 13 Dec 2013 20:33:59 +0000 (20:33 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259328 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFV r258571:
pfg [Fri, 13 Dec 2013 19:32:02 +0000 (19:32 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257062: Add the Raspberry Pi SPI controller driver.
ian [Fri, 13 Dec 2013 19:27:23 +0000 (19:27 +0000)]
MFC r257062: Add the Raspberry Pi SPI controller driver.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259325 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256949: Import basic support for Rockchip RK3188 SoC.
ian [Fri, 13 Dec 2013 19:17:09 +0000 (19:17 +0000)]
MFC r256949:  Import basic support for Rockchip RK3188 SoC.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259324 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257480:
ian [Fri, 13 Dec 2013 19:01:50 +0000 (19:01 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259323 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257197:
ian [Fri, 13 Dec 2013 18:26:22 +0000 (18:26 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259322 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258115 (partial);
pfg [Fri, 13 Dec 2013 18:23:14 +0000 (18:23 +0000)]
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/

git-svn-id: svn://svn.freebsd.org/base/stable/10@259320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256815:
ian [Fri, 13 Dec 2013 18:21:27 +0000 (18:21 +0000)]
MFC r256815:

  Calculate the baud rate divisor rather than using a hard-coded value.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259319 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256809: Add configuration for the Freescale i.MX53 Quick Start Board.
ian [Fri, 13 Dec 2013 17:29:31 +0000 (17:29 +0000)]
MFC r256809: Add configuration for the Freescale i.MX53 Quick Start Board.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259318 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256806, r256919, r257167:
ian [Fri, 13 Dec 2013 17:28:08 +0000 (17:28 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259317 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257130:
ian [Fri, 13 Dec 2013 17:23:47 +0000 (17:23 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256804:
ian [Fri, 13 Dec 2013 17:10:23 +0000 (17:10 +0000)]
MFC r256804:

  Switch to using the standard uart console driver instead of the special
  driver for early boot debugging.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259315 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256774:
ian [Fri, 13 Dec 2013 17:03:32 +0000 (17:03 +0000)]
MFC r256774:

  Clock divisors 0-3 correspond to dividing by 1-4, so add 1 before dividing.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259314 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256647:
ian [Fri, 13 Dec 2013 17:02:09 +0000 (17:02 +0000)]
MFC r256647:

  Invalidate the entire L2 cache before enabling it.  Say whether it
  has been enabled or disabled.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259313 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 256640: Allow 'make xdev' to work when DESTDIR is set.
ian [Fri, 13 Dec 2013 17:00:25 +0000 (17:00 +0000)]
MFC 256640:  Allow 'make xdev' to work when DESTDIR is set.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC 257006
asomers [Fri, 13 Dec 2013 16:55:39 +0000 (16:55 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259311 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256638:
ian [Fri, 13 Dec 2013 16:41:04 +0000 (16:41 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259310 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256637:
ian [Fri, 13 Dec 2013 16:38:21 +0000 (16:38 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259309 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256628:
ian [Fri, 13 Dec 2013 16:14:08 +0000 (16:14 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259308 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256492:
ian [Fri, 13 Dec 2013 16:09:07 +0000 (16:09 +0000)]
MFC r256492:

Add the long-missing spibus_if.m to the MFILES list.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259307 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259183:
trasz [Fri, 13 Dec 2013 15:25:51 +0000 (15:25 +0000)]
MFC r259183:

Properly refuse handoff requests on already connected sessions.  Previously
this would result in dropping the session.

Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@259306 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259182:
trasz [Fri, 13 Dec 2013 15:23:07 +0000 (15:23 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259305 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258871:
trasz [Fri, 13 Dec 2013 15:19:37 +0000 (15:19 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259304 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259003:
rmh [Fri, 13 Dec 2013 13:17:59 +0000 (13:17 +0000)]
MFC r259003:
Initialize modesetting sysctls in radeonkms.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259303 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r256657,r257018,r257347,r257423,r257729,r257767,
grehan [Fri, 13 Dec 2013 06:59:18 +0000 (06:59 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259301 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258367:
kib [Fri, 13 Dec 2013 06:28:18 +0000 (06:28 +0000)]
MFC r258367:
Verify for zero-length requests and act as if it is always successfull
without performing any action on the address space.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259299 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258366:
kib [Fri, 13 Dec 2013 06:25:08 +0000 (06:25 +0000)]
MFC r258366:
Add assertions to cover all places in the wiring and unwiring code
where MAP_ENTRY_IN_TRANSITION is set or cleared.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259297 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257899:
kib [Fri, 13 Dec 2013 06:12:21 +0000 (06:12 +0000)]
MFC r257899:
If filesystem declares that it supports shared locking for writes, use
shared vnode lock for VOP_PUTPAGES() as well.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257904:
kib [Fri, 13 Dec 2013 06:10:49 +0000 (06:10 +0000)]
MFC r257904:
Hide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef
_KERNEL braces.  Struct mount is only defined for the kernel build.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259295 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257898:
kib [Fri, 13 Dec 2013 06:09:19 +0000 (06:09 +0000)]
MFC r257898:
Change VFS_PROLOGUE() to evaluate the mp once, convert
MNTK_SHARED_WRITES and MNTK_EXTENDED_SHARED tests into inline functions.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259294 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259044:
kib [Fri, 13 Dec 2013 06:06:08 +0000 (06:06 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259292 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259043:
kib [Fri, 13 Dec 2013 06:00:44 +0000 (06:00 +0000)]
MFC r259043:
Build an allocator for the aligned memory on top of the rtld-private
malloc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259290 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259042:
kib [Fri, 13 Dec 2013 05:54:30 +0000 (05:54 +0000)]
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).

git-svn-id: svn://svn.freebsd.org/base/stable/10@259288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259156:
eadler [Fri, 13 Dec 2013 00:56:05 +0000 (00:56 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259281 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259274
rodrigc [Thu, 12 Dec 2013 21:51:33 +0000 (21:51 +0000)]
MFC r259274

Mention BIND removal in release notes.

Submitted by: skreuzer

git-svn-id: svn://svn.freebsd.org/base/stable/10@259277 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258712;
pfg [Thu, 12 Dec 2013 19:01:50 +0000 (19:01 +0000)]
MFC r258712;

libcpp: fix an underflow.

Similar fix seen in Apple's gcc42.

Obtained from: OpenBSD (Rev 1.2)
MFC after: 2 weeks

git-svn-id: svn://svn.freebsd.org/base/stable/10@259271 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258081, r258138, r258143, r258179, r258157, r258204, 258205,
pfg [Thu, 12 Dec 2013 18:15:32 +0000 (18:15 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r258427, r258694
andreast [Thu, 12 Dec 2013 13:00:07 +0000 (13:00 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259258 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r258051, r258052
andreast [Thu, 12 Dec 2013 12:36:40 +0000 (12:36 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259257 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r258722, r258757
andreast [Thu, 12 Dec 2013 12:29:35 +0000 (12:29 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259256 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r256932, r256938, r256953
andreast [Thu, 12 Dec 2013 12:17:20 +0000 (12:17 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259255 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258658:
mdf [Thu, 12 Dec 2013 02:03:42 +0000 (02:03 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259242 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259145:
np [Thu, 12 Dec 2013 00:27:27 +0000 (00:27 +0000)]
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@259241 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC: r257901
rmacklem [Wed, 11 Dec 2013 23:28:31 +0000 (23:28 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259238 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258930:
dumbbell [Wed, 11 Dec 2013 23:15:19 +0000 (23:15 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259237 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259104:
dumbbell [Wed, 11 Dec 2013 23:06:03 +0000 (23:06 +0000)]
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>

git-svn-id: svn://svn.freebsd.org/base/stable/10@259236 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r257991, r257992, 257993, 258504
andreast [Wed, 11 Dec 2013 22:36:20 +0000 (22:36 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259235 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259101:
dumbbell [Wed, 11 Dec 2013 22:26:09 +0000 (22:26 +0000)]
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@

git-svn-id: svn://svn.freebsd.org/base/stable/10@259234 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r259007
andreast [Wed, 11 Dec 2013 22:00:03 +0000 (22:00 +0000)]
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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259233 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258778
andreast [Wed, 11 Dec 2013 21:41:21 +0000 (21:41 +0000)]
MFC r258778

Add a printf to inform about the logical memory block size which is in use
by the system. This might give a hint why a pSeries system is not booting.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

10 years agoMFC r258615
andreast [Wed, 11 Dec 2013 21:37:32 +0000 (21:37 +0000)]
MFC r258615

Take care to handle the full 16 byte buffer in the get/put routines. Also,
skip the VTERM header once when receiving data from the hypervisor call when
we have a HVTERMPROT connection.

git-svn-id: svn://svn.freebsd.org/base/stable/10@259230 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f