Commit Graph

216719 Commits

Author SHA1 Message Date
Mark Johnston
6a4985f61c Fix tst.args1.c on LP64 platforms.
The untyped probe arguments have a width larger than int on such platforms,
so printing their value without a cast can give unexpected results.

MFC after:	1 week
2016-10-16 19:50:10 +00:00
Mark Johnston
31768cc105 tst.kpriv.ksh fails because DTrace privilege levels are unimplemented.
MFC after:	1 week
2016-10-16 19:46:55 +00:00
Mark Johnston
1d08a87aa8 Reference the libc symbols ypresp_{allfn,data} instead of local symbols.
This fixes a regression introduced in r285926.

PR:		213506
MFC after:	3 days
2016-10-16 19:12:22 +00:00
Alexander Motin
9be66df1e1 Add vfs.zfs.zil_log_limit sysctl.
It is at least partially broken now, but that is another question.
2016-10-16 18:49:15 +00:00
Luigi Rizzo
a82ab41168 add a missing header. 2016-10-16 18:27:41 +00:00
Luigi Rizzo
a9e644cd24 add two missing files for the netmap import 2016-10-16 15:22:17 +00:00
Luigi Rizzo
37e3a6d349 Import the current version of netmap, aligned with the one on github.
This commit, long overdue, contains contributions in the last 2 years
from Stefano Garzarella, Giuseppe Lettieri, Vincenzo Maffione, including:
+ fixes on monitor ports
+ the 'ptnet' virtual device driver, and ptnetmap backend, for
  high speed virtual passthrough on VMs (bhyve fixes in an upcoming commit)
+ improved emulated netmap mode
+ more robust error handling
+ removal of stale code
+ various fixes to code and documentation (some mixup between RX and TX
  parameters, and private and public variables)

We also include an additional tool, nmreplay, which is functionally
equivalent to tcpreplay but operating on netmap ports.
2016-10-16 14:13:32 +00:00
Jared McNeill
63f6b1a75a aw_ccu on H3 needs access to PRCM space. The r_pio controller works now. 2016-10-16 12:55:31 +00:00
Alexander Motin
a059d8ccbc Optimize ZIL itx memory allocation on FreeBSD.
These allocations can reach up to 128KB, while FreeBSD kernel allocator
can cache allocations only up to 64KB.  To avoid expensive allocations
for each large ZIL write use caching zio_buf_alloc() allocator instead.

To make it possible de-inline few instances of zil_itx_destroy().
2016-10-16 10:43:12 +00:00
Konstantin Belousov
e4b9ff3a9e Do not try to create /dev/efi device node before devfs is initialized.
Split efirt.ko initialization into early stage where runtime services
KPI environment is created, to be used e.g. for RTC, and the later
devfs node creation stage, per module.

Switch the efi device to use make_dev_s(9) instead of make_dev(9).  At
least, this gracefully handles the duplicated device name issue.

Remove ARGSUSED comment from efidev_ioctl(), all unused arguments are
annotated with __unused attribute.

Reported by:	ambrisko, O. Hartmann <ohartman@zedat.fu-berlin.de>
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2016-10-16 06:07:43 +00:00
Warner Losh
fe7d9f8ebc style(9) nit: space after |. 2016-10-16 05:53:18 +00:00
Justin Hibbits
69d251f910 Fix booting on systems that use loader(8) (most of them).
r306065/r306067 introduced ofw_parse_bootargs(), setting environment variables
from Open Firmware's /chosen/bootargs property.  On systems booting with
loader(8) (meaning, most systems), the initial static kenv is created with no
extra space, causing kern_setenv() to panic.  Since these already have the
environment set directly, there is no need to parse bootargs anyway.

Found by:	swills
2016-10-16 04:22:04 +00:00
Marcel Moolenaar
8d249f5e2f Switch to using the portable partition scheme headers. 2016-10-16 02:55:52 +00:00
Marcel Moolenaar
50875ed2c1 Re-apply change 306811 or alternatively, revert change 307385. 2016-10-16 02:43:51 +00:00
Marcel Moolenaar
9ffbf09f2f Revert change 306811 so that the change can be re-done using
svn copy instead of svn move.  This to preserve history on
the originals headers as well.
2016-10-16 02:05:22 +00:00
Mark Johnston
3176d87c9d Remove an unused field from struct pmcstat_image.
MFC after:	3 days
2016-10-15 23:46:55 +00:00
Jared McNeill
72f1cf0446 Add driver for GPIO controlled regulator.
Reviewed by:		gonzo, manu, mmel
Differential Revision:	https://reviews.freebsd.org/D8257
2016-10-15 20:04:14 +00:00
Baptiste Daroussin
23421d5492 Fix typos in sdiff(1) message and improve display 2016-10-15 19:55:07 +00:00
Navdeep Parhar
a1f4857f56 Fix typo in comments. 2016-10-15 18:20:15 +00:00
Emmanuel Vadot
b3d4851e86 axp209: Add support for regulators
Except for LDO4, all regulators are supported.

MFC after:	1 week
2016-10-15 17:49:41 +00:00
Andrew Turner
d88a17dd8f Fix the build, struct vfpstate needs to be visible to userspace as it's
part of struct pcb which is in a header used in libutil.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-10-15 16:29:06 +00:00
Baptiste Daroussin
31b54b30fe Improve wording
Submitted by:	lidl
2016-10-15 15:55:04 +00:00
Alexander Motin
4928a0c224 Add LU option to control reported provisioning type.
MFC after:	2 weeks
2016-10-15 14:40:34 +00:00
Baptiste Daroussin
db1fcc8008 Move cleanup() into the edit.c file which is the only users of that function
Remove common.{c,h}
2016-10-15 13:45:09 +00:00
Baptiste Daroussin
e8ad1a6f3d Turn editit into a static function 2016-10-15 13:42:38 +00:00
Baptiste Daroussin
196a5c7c35 Remove the common.h include which is actually not used in sdiff.c 2016-10-15 13:41:58 +00:00
Jared McNeill
3c6a684c11 Match "allwinner,sun8i-h3-apb0-gates-clk" compatible string. 2016-10-15 13:27:01 +00:00
Baptiste Daroussin
a0642264ba Use SRCTOP to find the sources of libucl 2016-10-15 13:17:27 +00:00
Baptiste Daroussin
26d8ca3bc9 directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2) 2016-10-15 13:16:52 +00:00
Baptiste Daroussin
963d6c18f4 Fix typo
Reported by:	"N.J. Mann" <njm@njm.me.uk>
2016-10-15 12:32:59 +00:00
Jared McNeill
2ee32f3c7f Provide a complete A23 PLL1 factor table, from 60MHz to 1872MHz. 2016-10-15 12:23:54 +00:00
Baptiste Daroussin
31288065a3 Regen 2016-10-15 12:11:30 +00:00
Baptiste Daroussin
a0135a1e35 Remove GNU rcs from base.
GNU rcs is still available as a package:
- rcs: Latest GPLv3 GNU rcs version.
- rcs57: Copy of the latest version of GNU rcs (GPLv2) from base.

Relnotes:	yes
2016-10-15 12:07:37 +00:00
Alexander Motin
15fd2e2412 Add LUN options to limit UNMAP and WRITE SAME sizes.
CTL itself has no limits on on UNMAP and WRITE SAME sizes.  But depending
on backends large requests may take too much time.  To avoid that new
configuration options allow to hint initiator maximal sizes it should not
exceed.

MFC after:	2 weeks
2016-10-15 10:29:33 +00:00
Andrew Turner
403ddccb10 Check we are in a critical section when calling vfp_discard. As we may call
it with a NULL thread pointer only check when it is non-NULL.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2016-10-15 09:54:22 +00:00
Andriy Gapon
2698bbbb5a aibs / atk0110: add support for querying sensors via GGRP and GITM
Comparing to the Linux driver there is still one missing feature.
The Linux driver finds and enables "Embedded Controller" item in
the 0x11 group if it's not enabled yet.

I tested the new method, Torfinn Ingolfsen tested the old method
and helped to fix several bugs in the earlier versions of the patch.

Tested by:	Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>
Reviewed by:	rpaulo
MFC after:	3 weeks
Differential Revision: https://reviews.freebsd.org/D8227
2016-10-15 09:10:35 +00:00
Ed Schouten
279d89406b Improve phrasing of the STANDARDS section.
Reported by:	wblock
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D8205
2016-10-15 08:09:55 +00:00
Warner Losh
55ff82c0db Implement -t. Use symbolic names in place of the magical 0x7.
Submitted by: ambrisko@
2016-10-15 06:16:35 +00:00
Warner Losh
40dd3b0bf1 Create a pcibios-version environment FORTH word. This allows one to
conditionally compile forth code before using the pcibios- words.
2016-10-15 05:53:09 +00:00
Patrick Kelsey
09c305eb65 Fix cases where the TFO pending counter would leak references, and eventually, memory.
Also renamed some tfo labels and added/reworked comments for clarity.

Based on an initial patch from jtl.

PR: 213424
Reviewed by:	jtl
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D8235
2016-10-15 01:41:28 +00:00
Jonathan T. Looney
82676a28eb r307082 added the TCP_HHOOK kernel option and made some existing code only
compile when that option is configured. In tcp_destroy(), the error
variable is now only used in code enclosed in an '#ifdef TCP_HHOOK' block.
This broke the build for VNET images.

Enclose the error variable itself in an #ifdef block.

Submitted by:	Shawn Webb <shawn.webb at hardenedbsd.org>
Reported by:	Shawn Webb <shawn.webb at hardenedbsd.org>
PointyHat to:	jtl
2016-10-15 00:29:15 +00:00
Oleksandr Tymoshenko
745c4aa5e8 Make BRCM2837 port conform FreeBSD/ARM64 guidelines
- Rename SOC_BCM2837 to SOC_BRCM_BCM2837, put it to opt_soc.h
- do not use files.XXX files, just move required sources to
    conf/files.arm64 and make them depend on soc_brcm_bcm2837

Suggested by: andrew
2016-10-14 22:23:03 +00:00
Andrew Turner
401d3029af Create macros for the MAIR memory attributes. While here add an uncached
memory type, however the VM code still needs to be taught about this.

MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-10-14 22:20:14 +00:00
John Baldwin
4fae28a084 Reprogram I/O APIC interrupt pins when registering an I/O APIC.
All I/O APIC pins are masked when an I/O APIC is first probed.  The
APIC enumerator (MP Table or MADT) then parses its associated tables to
configure individual pins to set custom delivery modes or alternate
routing (e.g. routing IRQ 0 to intpin 2).  Pins for regular interrupt
pins are left masked until the first interrupt is assigned.  However,
pins with unusual settings (e.g. NMI or SMI) are never assigned an
interrupt and thus never re-programmed.  The I/O APIC code used to
reprogram all interrupt pins during registration but this was lost in
r151979.

In theory, this is mostly a no-op as the ACPI APIC table does not
include a way to enumerate NMI or SMI pins for the I/O APIC, so only
systems using an MP Table would be affected.

Reported by:	avg
MFC after:	1 month
2016-10-14 21:51:50 +00:00
John Baldwin
31dc1e9681 Drop support for using mmap() with /dev/kmem.
Using the device pager with /dev/kmem is not stable since KVA mappings
are transient, but the device pager caches the PA associated with a
given offset forever.  Interestingly, mips' implementation of
memmap() already refused requests for /dev/kmem.

Note that kvm_read/kvm_write do not use mmap, but use read and write on
/dev/kmem, so this should not affect libkvm users.

Reviewed by:	kib
MFC after:	2 months
2016-10-14 20:01:07 +00:00
Oleksandr Tymoshenko
65de32210c Remove redundant kern_clocksource.c. It is already in conf/files.arm64
Reported by:	andrew
2016-10-14 17:40:48 +00:00
Sean Bruno
0d4600f607 Update i386 build of loader.efi (but leave it disabled) so that we at
least build it now.

Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D7801
2016-10-14 17:25:29 +00:00
Doug Ambrisko
afd9d8d0cb In UEFI mode expose the SMBIOS anchor base address via kenv so the kernel
etc. can find out where the SMBIOS entry point is located.  In pure
UEFI mode the BIOS is not mapped into the standard address space so the
SMBIOS table might not appear between 0xf0000 and 0xfffff.  The
UEFI environment can report this the location of the anchor.  If it is
reported then expose it as hint.smbios.0.mem.  This can then be used
by other tools.  However, we should make smbios(4) useful and have it
take this value and provide accesor function so ipmi(4) etc. don't
have to parse and figure things about the SMBIOS table.  I have some
simple patches to smbios(4) to expose this address as sysctl and
for ipmi(4) to get the base address.  However, the real fix is to
have ipmi(4) ask smbios(4) for what it wants and have smbios(4)
parse it out and return it.  This would make smbios(4) useful and reduce
duplicated code.  If this address doesn't point to the anchor then
finding SMBIOS info. will fail as if this didn't exist.  So there should
be no harm.

With this change and the following hack, dmidecode works on a bunch of
UEFI machines that I tested:

  if kenv hint.smbios.0.mem > /dev/null
  then
        mkdir -p /sys/firmware/efi
        mount -t tmpfs -o size=8k tmpfs /sys/firmware/efi
        echo "SMBIOS=`kenv hint.smbios.0.mem`" > /sys/firmware/efi/systab
  fi

Linux exposes this information via the /sys/firmware/efi/systab file which
dmidecode looks at.  We should update dmidecode to do this the FreeBSD
way when we determine what that is!

Reviewed by:	jhb
2016-10-14 17:10:53 +00:00
Ed Maste
df283203fc Simplify logic for libproc and librtld_db in lib/Makefile 2016-10-14 17:04:07 +00:00
Warner Losh
a2cb5fddcd Create a new linker set, Xficl_compile_set which contains a list of
functions to call at the appropriate time to register new forth
words. In the past we've done this with ifdef soup, but now if the
file is included in the build, we'll get the new forth words.

Use this new functionality to move the pci bios stuff out of loader.c
by moving it to biospci.c.

Move the pnp functionality to common/pnp.c.

Move the inb/outb forth words to the i386 sysdep.c file where their
implementation is defined.

Adjust the efi linker scripts and build machinery to cope.

his should be an invisible change to forth scripts and user
experience.

Differential Revision: https://reviews.freebsd.org/D8145
2016-10-14 16:23:12 +00:00