Commit Graph

198458 Commits

Author SHA1 Message Date
imp
1bfc6325f7 Use MK_CRYPT=no in preference to WITHOUT_CRYPT here. 2014-04-05 17:54:55 +00:00
imp
ee2da7ebbe use MK_KERBEROS=no in preference to WITHOUT_KERBEROS 2014-04-05 17:54:50 +00:00
imp
9878392e1a Convert from WITHOUT_SYSCALL_COMPAT to MK_SYSCALL_COMPAT. 2014-04-05 17:54:43 +00:00
imp
5db7302acc The proper way to request no man pages currently is NO_MAN=xxx. Use it
in preference to the user WITHOUT_MAN knob, which should never be set
in normal src Makefiles.
2014-04-05 17:54:36 +00:00
loos
051ba34f7c - Fix the setup of interrupts for banks 2 and 3 on AM335x.
On AM335x each one of the four GPIO banks has two physical interrupt
    lines, so we now allocate resources and setup our interrupt handler for
    all the (8) available interrupts.

    On OMAP3 and OMAP4 there is only one interrupt for each GPIO bank (6
    banks, 6 interrupts), but there are two set of registers where the
    first one is used to setup the delivery of interrupts to the MPU and
    the second set, setup the delivery of interrupts to the DSP.

    On AM335x, each set of registers controls each one of the interrupt
    lines.

- Remove nonexistent registers for OMAP4 and AM335x, replace their use with
  the correct ones for these SoCs.

- Remove stray whitespace.

Based on OMAP3, OMAP4 and AM335x TRMs.

Tested on Beaglebone-black.
2014-04-05 17:53:59 +00:00
dchagin
e0cab82fb2 Prevent alq from panic when the invalid alq_file path specified.
MFC after:	1 week
2014-04-05 16:54:47 +00:00
br
6c1fcc9eea Correct the end address of the video frame buffer.
This fixes problem that sometimes display suddenly
goes blank.
2014-04-05 16:38:27 +00:00
ian
94f16d7a87 Add ioctl(2) calls to uftdi(4) to access bitbang, MPSSE, CPU_FIFO, and
other modes supported by the FTDI serial adapter chips.

In addition to adding the new ioctls, this change removes all the code
that reset the chip at attach and open/close time, and also the code
that turned on RTS/CTS flow control on open without any permission to do
so (that was just always a bug in the driver).

When FTDI chips are configured as GPIO or MPSSE or other special-purpose
uses by an attached serial eeprom, the chip will power on with certain
pins driven or floating, and it's important that the driver not do
anything to the chip to perturb that unless it receives a specific
command to do so.  When used for "plain old serial comms" the chip
powers on into the right mode and never needs to be reset while it's
running to operate properly, so this change is transparent to most users.
2014-04-05 16:08:13 +00:00
kib
e965005b68 When KN_INFLUX is set on the knote due to kqueue_register() or
kqueue_scan() unlocking the kqueue to call f_event, knote() or
knote_fork() should not skip the knote.  The knote is not going to
disappear during the influx time, and the mutual exclusion between
scan and knote() is ensured by both code pathes taking knlist lock.
The race appears since knlist lock is before kq lock, so KN_INFLUX
must be set, kq lock must be dropped and only then knlist lock can be
taken.  The window between kq unlock and knlist lock causes lost
events.

Add a flag KN_SCAN to indicate that KN_INFLUX is set in a manner safe
for the knote(), and check for it to ignore KN_INFLUX in the knote*()
as needed.  Also, in knote(), remove the lockless check for the
KN_INFLUX flag, which could also result in the lost notification.

Reported and tested by:	Kohji Okuno <okuno.kohji@jp.panasonic.com>
Discussed with:	jmg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-04-05 14:09:16 +00:00
mav
dd28e6bbc0 Add property and sysctl to control how ZVOLs are exposed to OS.
New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2014-04-05 13:01:44 +00:00
ed
4c2420b4ca Add missing userspace bits to <sys/procdesc.h>.
- Include <sys/_types.h> and define pid_t.
- Add __BEGIN_DECLS/__END_DECLS.

In my opinion we should have considered putting the userspace bits in a
different header (e.g., <procdesc.h>), but I think we've already passed
that point.
2014-04-05 11:37:58 +00:00
theraven
41f3d1de31 Silence a warning with GCC that was breaking the build with Juniper's GCC.
Reviewed by:	marcel
2014-04-05 08:17:48 +00:00
bdrewery
2eab8fff0d Show error code when failing to destroy a mirror on delay
Sponsored by:	EMC / Isilon Storage Division
MFC after:	2 weeks
2014-04-05 03:01:29 +00:00
emaste
18755bc3d6 Initialise m_pkthdr via bzero instead of explicitly zeroing each member
Sponsored by:	The FreeBSD Foundation
2014-04-04 21:09:06 +00:00
ian
62cc224e61 Enable SMP for Pandaboard. 2014-04-04 20:58:45 +00:00
ian
505791375a Switch wandboards over to the common IMX6 kernel config, which has SMP
enabled.  Also switch IMX6 to use SCHED_ULE.

The now-unreferenced WANDBOARD.common config will be deleted after giving
folks who may be including it a heads-up to switch to IMX6.
2014-04-04 20:42:44 +00:00
ed
bf6556bd2d Correct return type of pdfork(2).
The pdfork(2) man page states:

	"pdfork() returns a PID, 0 or -1, as fork(2) does."

As it returns a PID, the return type should obviously be pid_t. As int
and pid_t have the same size on all architectures, this change does not
affect the ABI in any way.
2014-04-04 19:53:45 +00:00
ian
34954ea5f5 We don't support any ARM systems with an ISA bus and don't need a freelist
of memory to support ISA addressing limitations.
2014-04-04 19:35:38 +00:00
jmmv
f5ead69e01 Fix variable type to avoid printf formatter warning.
This fixes the build under powerpc64 where gcc complains about a mismatch
between a %zd printf formatter and an int variable passed to it.
2014-04-04 18:10:11 +00:00
emaste
c6be8be4ba Connect sys/boot/amd64 to the build
Sponsored by:	The FreeBSD Foundation
2014-04-04 18:07:21 +00:00
bapt
8e308e2e19 Prevent XDTP from being a relative path
XDTP is used as the default SYSROOT for clang and thus should be an absolute path.

PR:		arm/188249
Submitted by:	Edgar Martinez <wink15987@gmail.com>
Reviewed by:	imp
2014-04-04 17:58:33 +00:00
ian
7ff22412a8 Allocate per-cpu resources for doing pmap_zero_page() and pmap_copy_page().
This is performance enhancement rather than bugfix.
2014-04-04 17:57:49 +00:00
ian
9c05a7bf5e Fix TLB maintenance issues for armv6 and armv7.
- Add cpu_cpwait to comply with the convention.
  - Add missing TLB invalidations, especially in pmap_kenter & pmap_kremove
    with distinguishing between D and ID pages.
  - Modify pmap init/bootstrap invalidations to ID, just to be safe.
  - Fix TLB-inv and PTE_SYNC ordering.

This combines changes submitted by ian@, cognet@, and Wojciech Macek,
which have all been tested together as a unit.
2014-04-04 17:45:39 +00:00
ian
88f74c5486 Fix TTB set operation for armv7.
Perform sychronization (by "isb" barrier) after TTB is set.  This
is done to ensure that TLB invalidation always executes after
TTB modification and operates on valid CP15 data (per specification).

Submitted by:	Wojciech Macek <wma@semihalf.com>
Reviewed by:	ian@, cognet@
2014-04-04 17:39:05 +00:00
sbruno
503ad10bae Add PCI-IDs for TBD Gen9 RAID controller HBAs from HP to ciss(4)
Submitted by:	Benesh, Scott <scott.benesh@hp.com>
MFC after:  2 weeks
Sponsored by:	Yahoo! Inc.
2014-04-04 17:01:49 +00:00
ae
7afb4f39b4 The check for local address spoofing lacks ifaddr locking.
Remove these loops and use in_localip() and in6_localip()
functions instead.

MFC after:	1 week
Sponsored by:	Yandex LLC
2014-04-04 16:58:32 +00:00
ae
a503000e26 Remove unused variable.
MFC after:	1 week
Sponsored by:	Yandex LLC
2014-04-04 15:57:27 +00:00
ae
11ab69a2c3 Remove dead code.
MFC after:	1 week
Sponsored by:	Yandex LLC
2014-04-04 15:55:38 +00:00
sbruno
d84e22670b Change kernel/rootfs hints to use search patterns instead of absolute
locations.
2014-04-04 15:52:45 +00:00
trasz
5e641669b5 Rework the iSCSI PDU transmit code to avoid lock contention and coalesce
PDUs before sending.

Sponsored by:	The FreeBSD Foundation
2014-04-04 15:49:37 +00:00
pfg
661056080a gcc: define __block when block support is enabled
This mimics the behaviour in clang and lets us build cleanly
the libdispatch port on platforms where the base gcc is still
the default compiler.

Bump __FreeBSD_version for ports.

Tested by:	theraven
MFC after:	3 days
2014-04-04 15:49:23 +00:00
ian
041f9bbdd2 Flag several sysctl variables as tunables. 2014-04-04 15:31:57 +00:00
ian
b44ad51765 Adjust the comments about translating clock divisor bits to match recent
code changes.
2014-04-04 15:03:03 +00:00
emaste
64007aba64 Fix printf format mismatches
Sponsored by:	The FreeBSD Foundation
2014-04-04 13:35:36 +00:00
davidxu
80a7722c32 Fix SIGIO delivery. Use fsetown() to handle file descriptor owner
ioctl and use pgsigio() to send SIGIO.

Submitted by:	truckman
Reviewed by:	mjg
2014-04-04 12:31:13 +00:00
trasz
642cc48cbc All the iSCSI sysctls are also tunables; advertise that.
Sponsored by:	The FreeBSD Foundation
2014-04-04 08:48:55 +00:00
trasz
56ca79568d We don't need TAILQ for iSCSI PDUs; STAILQ is enough.
Sponsored by:	The FreeBSD Foundation
2014-04-04 08:43:23 +00:00
gjb
da0c56cf24 Merge r262906 from ^/projects/release-embedded:
Remove only-works-on-amd64 restriction.

Sponsored by:	The FreeBSD Foundation
2014-04-04 07:42:12 +00:00
gjb
9ca8f86a7e Merge r262907 from ^/projects/release-embedded:
Add ZEDBOARD support for release builds.

Sponsored by:	The FreeBSD Foundation
2014-04-04 07:02:38 +00:00
mjg
439611d0ad Garbage collect fdavail.
It rarely returns an error and fdallocn handles the failure of fdalloc
just fine.
2014-04-04 05:07:36 +00:00
br
905a22bf60 Remove unused prototype. 2014-04-04 05:05:43 +00:00
ian
221304dbac Let's try having just one mmc/sd controller driver.
Pointed out by:	gjb
2014-04-04 03:48:43 +00:00
ian
0ad73a70af Use the sdhci driver for Pandaboard. 2014-04-04 03:24:19 +00:00
ian
ada1a1d279 Switch OMAP4 (Pandaboard et. al.) to use the ti_sdhci driver. 2014-04-04 03:11:06 +00:00
ian
fe42a405ab Fix the logic for translating between MMCHS and SDHCI clock divisors.
Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
2014-04-04 03:04:29 +00:00
grog
781b54fe9b -k option is compliant with POSIX. 2014-04-04 01:48:25 +00:00
ian
2060738e54 When changing the sd bus clock divisor, clear just the bus clock enable bit
before changing the divisor bits in the register.  We were writing a zero
to the register, which clears the enable, but also cleared the divisor bits
at the same time.  That's a violation of the sdhci spec, which says the
divisor can only be changed when the clock is disabled.  This has worked
okay on most hardware for years, but the TI OMAP controller would misbehave
after changing the divisor improperly.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
2014-04-04 01:10:02 +00:00
ian
0a212699bb Various fixes to the ti_sdhci driver, mostly to make it work on Pandaboard.
- Don't allow high-speed mode on OMAP4 due to hardware erratum.
 - Check the proper bit in the status register when waiting for the
   controller to come out of reset.
 - Add handling for the "non-removable" fdt property by always returning
   "card is present" status.
 - Add the non-removable property for the MMC card on a Beaglebone Black.
 - Add the non-removable property for Pandaboard as a workaround.

For Pandaboard the card detect pin is handled by the twl6030 fpga device
which gets an interrupt on pin change and then has to query the fpga
for the actual status.  We don't have code to do that yet.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>
2014-04-04 00:59:40 +00:00
emaste
c72005d63b Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some
additional refinements.  This is derived from (and replaces) the
original i386 efi implementation; i386 support will be restored later.

Specific revisions of note from projects/uefi:

r247380:

  Adjust our load device when we boot from CD under UEFI.

  The process for booting from a CD under UEFI involves adding a FAT
  filesystem containing your loader code as an El Torito boot image.
  When UEFI detects this, it provides a block IO instance that points at
  the FAT filesystem as a child of the device that represents the CD
  itself. The problem being that the CD device is flagged as a "raw
  device" while the boot image is flagged as a "logical partition". The
  existing EFI partition code only looks for logical partitions and so
  the CD filesystem was rendered invisible.

  To fix this, check the type of each block IO device. If it's found to
  be a CD, and thus an El Torito boot image, look up its parent device
  and add that instead so that the loader will then load the kernel from
  the CD filesystem.  This is done by using the handle for the boot
  filesystem as an alias.

  Something similar to this will be required for booting from other
  media as well as the loader will live in the EFI system partition, not
  on the partition containing the kernel.

r246231:

  Add necessary code to hand off from loader to an amd64 kernel.

r246335:

  Grab the EFI memory map and store it as module metadata on the kernel.

  This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

  Pass the ACPI table metadata via hints so the kernel ACPI code can
  find them.

r246608:

  Rework copy routines to ensure we always use memory allocated via EFI.

  The previous code assumed it could copy wherever it liked. This is not
  the case. The approach taken by this code is pretty ham-fisted in that
  it simply allocates a large (32MB) buffer area and stages into that,
  then copies the whole area into place when it's time to execute. A more
  elegant solution could be used but this works for now.

r247214:

  Fix a number of problems preventing proper handover to the kernel.

  There were two issues at play here. Firstly, there was nothing
  preventing UEFI from placing the loader code above 1GB in RAM. This
  meant that when we switched in the page tables the kernel expects to
  be running on, we are suddenly unmapped and things no longer work. We
  solve this by making our trampoline code not dependent on being at any
  given position and simply copying it to a "safe" location before
  calling it.

  Secondly, UEFI could allocate our stack wherever it wants. As it
  happened on my PC, that was right where I was copying the kernel to.
  This did not cause happiness. The solution to this was to also switch
  to a temporary stack in a safe location before performing the final
  copy of the loaded kernel.

r246231:

  Add necessary code to hand off from loader to an amd64 kernel.

r246335:

  Grab the EFI memory map and store it as module metadata on the kernel.

  This is the same approach used to provide the BIOS SMAP to the kernel.

r246336:

  Pass the ACPI table metadata via hints so the kernel ACPI code can
  find them.

r246608:

  Rework copy routines to ensure we always use memory allocated via EFI.

  The previous code assumed it could copy wherever it liked. This is not
  the case. The approach taken by this code is pretty ham-fisted in that
  it simply allocates a large (32MB) buffer area and stages into that,
  then copies the whole area into place when it's time to execute. A more
  elegant solution could be used but this works for now.

r247214:

  Fix a number of problems preventing proper handover to the kernel.

  There were two issues at play here. Firstly, there was nothing
  preventing UEFI from placing the loader code above 1GB in RAM. This
  meant that when we switched in the page tables the kernel expects to
  be running on, we are suddenly unmapped and things no longer work. We
  solve this by making our trampoline code not dependent on being at any
  given position and simply copying it to a "safe" location before
  calling it.

  Secondly, UEFI could allocate our stack wherever it wants. As it
  happened on my PC, that was right where I was copying the kernel to.
  This did not cause happiness. The solution to this was to also switch
  to a temporary stack in a safe location before performing the final
  copy of the loaded kernel.

r247216:

  Use the UEFI Graphics Output Protocol to get the parameters of the
  framebuffer.

Sponsored by:	The FreeBSD Foundation
2014-04-04 00:16:46 +00:00
ian
1792ca3cfb Actually save the clock frequency retrieved from fdt data. I fumbled
this when I converted getprop to getencprop.

Submitted by:	Thomas Skibo
Pointy hat to:	ian
2014-04-04 00:00:05 +00:00