194256 Commits

Author SHA1 Message Date
gjb
452ca0b4a4 MFC r259400:
Reduce disc1.iso size by 74MB by removing lib32 libraries, sendmail,
  and atf.

Sponsored by:	The FreeBSD Foundation
2013-12-14 22:43:30 +00:00
gjb
e88772b06f 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
2013-12-14 22:39:01 +00:00
gjb
1948707197 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
2013-12-14 20:55:53 +00:00
ae
1277739e09 MFC r257987:
Initialize prot variable.

  PR:		177417
2013-12-14 04:24:32 +00:00
ae
a210965c36 MFC r257965:
Add missing line breaks.

  PR:		181900
2013-12-14 04:16:27 +00:00
ian
38c5c4197f 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.
2013-12-14 01:35:57 +00:00
ian
6af39cbc39 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...
2013-12-14 01:34:24 +00:00
ian
47bb9f823b MFC r258828:
Add a nand flash controller driver for Atmel at91 family.  Tested only
  on at91rm9200 so far.
2013-12-14 01:15:26 +00:00
ian
cbcef6d7b5 MFC r258820: Add definitions for the PIO pins found on recent AT91 SoCs. 2013-12-14 01:14:38 +00:00
ian
b37938a4e4 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.
2013-12-14 01:12:13 +00:00
ian
1185e66967 MFC r258393:
Add USB_HOST_ALIGN=64; the cache line size on the am335x is 64 bytes.
2013-12-14 00:59:40 +00:00
ian
c3017e9225 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.
2013-12-14 00:58:13 +00:00
ian
af5e386ba3 MFC r258240:
In the data abort handler, don't panic if kdb is available and says it
  handled the condition.
2013-12-14 00:57:05 +00:00
ian
c6dcd8817f 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.
2013-12-14 00:55:34 +00:00
ian
8b635cded3 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.
2013-12-14 00:54:05 +00:00
ian
3360970b01 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.
2013-12-14 00:25:57 +00:00
ian
2c66a0246a 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.
2013-12-14 00:23:43 +00:00
ian
f1d49f684d 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.
2013-12-14 00:16:08 +00:00
ian
eae48ec05e 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).
2013-12-13 23:56:53 +00:00
ian
689fd5c390 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.
2013-12-13 23:07:22 +00:00
ian
55d93a867d 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.
2013-12-13 22:52:59 +00:00
ian
4c517a4890 MFC r257595: Comments and style(9) only, no functional changes. 2013-12-13 22:51:09 +00:00
ian
bf69534180 MFC r257561:
Bugfix:  the attach routine needs to use the same table of fdt compat
  strings that the probe routine used.
2013-12-13 22:50:12 +00:00
ian
a10cf699d1 MFC r257557: Add a missing register definition. 2013-12-13 22:49:18 +00:00
ian
cee3a0f503 MFC r257556:
Arrange for uart_cpu_fdt's probe() routine to use the same table of compat
  strings as uart_bus_fdt's probe().
2013-12-13 22:48:01 +00:00
ian
2b338fd3cf 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.
2013-12-13 22:46:10 +00:00
ian
ec4b958426 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.
2013-12-13 22:41:57 +00:00
ian
c48d670c8a 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.
2013-12-13 22:30:21 +00:00
ian
3a53055ae2 MFC r257454: Add sdhci driver glue for imx family SoCs. 2013-12-13 22:28:19 +00:00
ian
3e4a60e997 MFC r257453: Add stubbed-out imx6 support for clocks and power management. 2013-12-13 22:27:26 +00:00
ian
bbdd01b151 MFC r257452: Add support for the USB PHY on imx6 SoCs. 2013-12-13 22:26:10 +00:00
ian
59d4157d7f MFC r257419:
Do not EOI an interrupt until the point after the filter handlers / before
  threaded handlers.
2013-12-13 22:24:00 +00:00
ian
0c80ffaa7f 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.
2013-12-13 22:22:54 +00:00
ian
806c36728f 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.
2013-12-13 22:21:49 +00:00
ian
26cb2d5903 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.
2013-12-13 22:21:04 +00:00
ian
52408050e1 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.
2013-12-13 22:19:21 +00:00
ian
a551aaa6fa MFC r257390: Add a vendor entry for Freescale Semiconductor. 2013-12-13 22:15:24 +00:00
ian
378834fde5 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.
2013-12-13 22:12:37 +00:00
ian
7de85345e2 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.
2013-12-13 22:08:31 +00:00
rpaulo
705dc5de8f MFC r256658, r256666:
Move a lot of debugging printf's to DPRINTF.
2013-12-13 21:57:44 +00:00
ian
62e9fdf2f7 MFC r257203: Eliminate a compiler warning about extraneous parens. 2013-12-13 21:41:40 +00:00
ian
dc79f485d8 MFC r257201, r257202
Retire arm_remap_nocache() and the data and constants associated with it.
2013-12-13 21:40:12 +00:00
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