Commit Graph

19104 Commits

Author SHA1 Message Date
Landon J. Fuller
f3524ec8ed bhnd(4): include a subset of the ChipCommon capability flags in bhnd_chipid;
this provides early access to device capability flags required by bhnd(4)
bus and bhndb(4) bridge drivers.
2018-03-29 19:44:15 +00:00
Jeff Roberson
e5818a53db Implement several enhancements to NUMA policies.
Add a new "interleave" allocation policy which stripes pages across
domains with a stride or width keeping contiguity within a multi-page
region.

Move the kernel to the dedicated numbered cpuset #2 making it possible
to assign kernel threads and memory policy separately from user.  This
also eliminates the need for the complicated interrupt binding code.

Add a sysctl API for viewing and manipulating domainsets.  Refactor some
of the cpuset_t manipulation code using the generic bitset type so that
it can be used for both.  This probably belongs in a dedicated subr file.

Attempt to improve the include situation.

Reviewed by:	kib
Discussed with:	jhb (cpuset parts)
Tested by:	pho (before review feedback)
Sponsored by:	Netflix, Dell/EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D14839
2018-03-29 02:54:50 +00:00
Glen Barber
0e976a76ff Add an example for building SD card images for the RPI-B and
RPI3.

MFC after:	3 days
Suggested by:	Arshan Khanifar
Reviewed by:	Arshan Khanifar <arshan@freebsdfoundation.org>
Sponsored by:	The FreeBSD Foundation
2018-03-28 18:43:06 +00:00
Glen Barber
a8233b81c7 Update the Release Engineering article URL to the modern version.
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2018-03-28 18:28:27 +00:00
Bryan Drewery
7d9f50a4ba Avoid looping if SYSDIR already known.
Sponsored by:	Dell EMC
2018-03-28 16:28:24 +00:00
Bryan Drewery
ffae081b1e Avoid upwards directory walk in kernel build for finding known SYSDIR.
Sponsored by:	Dell EMC
2018-03-28 16:28:20 +00:00
Eitan Adler
6472fa9a9d [iwm] Add support for iwm 3168 cards
```
iwm0@pci0:5:0:0:        class=0x028000 card=0x21108086 chip=0x24fb8086
rev=0x10 hdr=0x00
vendor     = 'Intel Corporation'
device     = 'Dual Band Wireless-AC 3168NGW [Stone Peak]'
class      = network
[94829] iwm0: <Intel(R) Dual Band Wireless AC 3168> mem
0xef700000-0xef701fff at device 0.0 on pci5
[94829] iwm0: hw rev 0x220, fw ver 22.361476.0, address
28:c6:3f:15:43:c5
```

MFC After:	2 weeks
Reviewed by:	ivadasz (over IRC)
PR:		224886
Differential Revision:	https://reviews.freebsd.org/D14865
2018-03-28 07:59:16 +00:00
Rodney W. Grimes
37defe016f Add Bruce Evans
Update my mentors to bde and phk

Approved by:	core, bde (mentor), phk (mentor)
MFC after:	3 days
2018-03-28 07:49:36 +00:00
Edward Tomasz Napierala
ac663598df Add trailing slash for consistency.
For some reason, the other link - https://lists.FreeBSD.org/ - needs
the trailing slash, otherwise man(8) renders it in a weird way.  No
idea why's that.  At least try to be consistent.  Revert it when the
other link gets fixed.

MFC after:	2 weeks
2018-03-27 14:54:02 +00:00
Edward Tomasz Napierala
f9b7620b3e Use https:// instead of http://.
MFC after:	2 weeks
2018-03-27 14:51:19 +00:00
Edward Tomasz Napierala
f007c46d25 Fix capitalization.
MFC after:	2 weeks
2018-03-27 14:50:12 +00:00
Mark Peek
8c302b2e86 Rectify VMCI SPDX license
Approved by: Vishnu Dasa <vdasa@vmware.com>
2018-03-27 06:33:00 +00:00
Warner Losh
e05b3850c7 Note that MODULE_PNP_INFO has to come after a DRIVER_MODULE. 2018-03-25 17:12:09 +00:00
Eitan Adler
583a5f393f [pci-vendors] Update to 2018-03-21
MFC After:	3 days
2018-03-25 16:57:21 +00:00
Mark Peek
63a938566d Add VMCI (Virtual Machine Communication Interface) driver
In a virtual machine, VMCI is exposed as a regular PCI device. The primary
communication mechanisms supported are a point-to-point bidirectional
transport based on a pair of memory-mapped queues, and asynchronous
notifications in the form of datagrams and doorbells. These features are
available to kernel level components such as vSockets through the VMCI
kernel API. In addition to this, the VMCI kernel API provides support for
receiving events related to the state of the VMCI communication channels,
and the virtual machine itself.

Submitted by: Vishnu Dasa <vdasa@vmware.com>
Reviewed by: bcr, imp
Obtained from: VMware
Differential Revision: https://reviews.freebsd.org/D14289
2018-03-25 00:57:00 +00:00
Jeff Roberson
93f31533df Document new NUMA related syscalls and utility options.
Sponsored by:	Netflix, Dell/EMC Isilon
2018-03-24 23:58:44 +00:00
Emmanuel Vadot
c2f5940db3 Add dtb overlays support
DTB Overlays are useful to change/add nodes to a dtb without the need to
modify it.
Add support for building dtbo during buildkernel.
The goal of DTBO present in the FreeBSD source tree is to fill a gap in
time when we submit changes upstream (Linux). Instead of waiting 2 to 4 months
we can add a DTBO in tree in the meantime.
This is not for adding DTBO for capes/hat/addon boards, those will be
better to put in a ports.
This is also not for enabling a i2c/spi/pwm controller on certain pins,
each user have a different use case for those (which pins to use etc ...)
and we cannot have all possible configuration.

Add a dtbo for sun8i-h3-sid which add the SID node missing in upstream dts.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D14782
2018-03-24 21:30:24 +00:00
Matthias Fechner
4bc7ec2c66 Added myself to committers-ports.dot.
Reviewed by:	tz (mentor)
Approved by:	tz (mentor)
Differential Revision:	https://reviews.freebsd.org/40631
2018-03-24 09:10:50 +00:00
Kristof Provost
effaab8861 netpfil: Introduce PFIL_FWD flag
Forwarded packets passed through PFIL_OUT, which made it difficult for
firewalls to figure out if they were forwarding or producing packets. This in
turn is an issue for pf for IPv6 fragment handling: it needs to call
ip6_output() or ip6_forward() to handle the fragments. Figuring out which was
difficult (and until now, incorrect).
Having pfil distinguish the two removes an ugly piece of code from pf.

Introduce a new variant of the netpfil callbacks with a flags variable, which
has PFIL_FWD set for forwarded packets. This allows pf to reliably work out if
a packet is forwarded.

Reviewed by:	ae, kevans
Differential Revision:	https://reviews.freebsd.org/D13715
2018-03-23 16:56:44 +00:00
Christian S.J. Peron
49f12e36d0 Document the limitations associated with using the audit syscalls
from jailed process.  These might get implemented in jails in the
future, but for now they are not supported.

Discussed on:   freebsd-security@
Reviewed by:    brueffer@
MFC after:      2 weeks
2018-03-21 17:22:42 +00:00
Ruslan Bukin
30b3274fff Add new shared library -- libipt.
libipt is the Intel Processor Trace (Intel PT) packets decoder.

- Include libipt to amd64 build.
- Install libipt headers to /usr/include/libipt/

Sponsored by:	DARPA, AFRL
2018-03-21 14:37:04 +00:00
Eitan Adler
36b61ad380 [bsd-family-tree] Announce NetBSD 7.1.2
MFC After:	3 days
2018-03-21 09:07:01 +00:00
Sevan Janiyan
b7440a86c8 Extend the description of ALTQ to call it a system which is a framework in
altq(4) to match altq(9). This makes preserving the history section as the
author of ALTQ easier in the history section, rather than calling it a framework
in the description & a system in the history.
Add a history section to altq(4) and extend the history section in altq(9)

Approved by:	bcr (mentor)
MFC after:	5 days
Differential Revision:	 https://reviews.freebsd.org/D14774
2018-03-20 22:41:26 +00:00
Warner Losh
57b4b5f816 Remove reference to lint. We no longer support it, so exceptions for
it are no longer relevant.
2018-03-20 21:37:33 +00:00
Warner Losh
793c98590a Update to include information about using SPDX-License-Identifier
lines.
2018-03-20 21:31:18 +00:00
John Baldwin
1e18e7d203 Add support for MIPS to LLVM's libunwind.
This is originally based on a patch from David Chisnall for soft-float
N64 but has since been updated to support O32, N32, and hard-float ABIs.
The soft-float O32, N32, and N64 support has been committed upstream.
The hard-float changes are still in review upstream.

Enable LLVM_LIBUNWIND on mips when building with a suitable (C+11-capable)
toolchain.  This has been tested with external GCC for all ABIs and
O32 and N64 with clang.

Reviewed by:	emaste
Obtained from:	CheriBSD (original N64 patch)
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D14701
2018-03-20 15:44:17 +00:00
Lawrence Stewart
370efe5ac8 Add support for the experimental Internet-Draft "TCP Alternative Backoff with
ECN (ABE)" proposal to the New Reno congestion control algorithm module.
ABE reduces the amount of congestion window reduction in response to
ECN-signalled congestion relative to the loss-inferred congestion response.

More details about ABE can be found in the Internet-Draft:
https://tools.ietf.org/html/draft-ietf-tcpm-alternativebackoff-ecn

The implementation introduces four new sysctls:

- net.inet.tcp.cc.abe defaults to 0 (disabled) and can be set to non-zero to
  enable ABE for ECN-enabled TCP connections.

- net.inet.tcp.cc.newreno.beta and net.inet.tcp.cc.newreno.beta_ecn set the
  multiplicative window decrease factor, specified as a percentage, applied to
  the congestion window in response to a loss-based or ECN-based congestion
  signal respectively. They default to the values specified in the draft i.e.
  beta=50 and beta_ecn=80.

- net.inet.tcp.cc.abe_frlossreduce defaults to 0 (disabled) and can be set to
  non-zero to enable the use of standard beta (50% by default) when repairing
  loss during an ECN-signalled congestion recovery episode. It enables a more
  conservative congestion response and is provided for the purposes of
  experimentation as a result of some discussion at IETF 100 in Singapore.

The values of beta and beta_ecn can also be set per-connection by way of the
TCP_CCALGOOPT TCP-level socket option and the new CC_NEWRENO_BETA or
CC_NEWRENO_BETA_ECN CC algo sub-options.

Submitted by:	Tom Jones <tj@enoti.me>
Tested by:	Tom Jones <tj@enoti.me>, Grenville Armitage <garmitage@swin.edu.au>
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D11616
2018-03-19 16:37:47 +00:00
Edward Tomasz Napierala
d09cfd2724 Fix typo.
MFC after:	2 weeks
2018-03-18 16:24:11 +00:00
Edward Tomasz Napierala
bdfc6e62ff Here's the new development(7), which removes information that's
no longer relevant (read: most of what was there) and adds some
quick links to point newcomers in the right direction.

Reviewed by:	imp@
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14680
2018-03-18 15:44:07 +00:00
Edward Tomasz Napierala
7651c3af83 Fix formatting errors that resulted in apropos(1) output looking weird.
MFC after:	2 weeks
2018-03-17 11:41:06 +00:00
Devin Teske
3485f3b359 Add myself to committers-ports.dot
Reviewed by:	imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D14688
2018-03-16 21:03:54 +00:00
Baptiste Daroussin
8bf523086d Add termcap entries for the st terminal (https://st.sucksless.org)
MFC after:	3 days
2018-03-15 15:13:17 +00:00
Baptiste Daroussin
ce037f1b21 Fix tab vs space indentation
MFC after:	3 days
2018-03-15 15:05:26 +00:00
Baptiste Daroussin
28c1fdff51 Update to 2018-03-06
MFC after:	3 days
2018-03-14 19:09:58 +00:00
Devin Teske
576157b3ec Install files added in SVN's r295373, r295457, r295542
Reported by:	woodsb02
MFC after:	3 days
X-MFC to:	stable/11
2018-03-13 23:37:33 +00:00
Roger Pau Monné
4a6d4e7b58 at_rtc: check in ACPI FADT boot flags if the RTC is present
Or else disable the device. Note that the detection can be bypassed by
setting the hw.atrtc.enable option in the loader configuration file.
More information can be found on atrtc(4).

Sponsored by:		Citrix Systems R&D
Reviewed by:		ian
Differential revision:	https://reviews.freebsd.org/D14399
2018-03-13 09:42:33 +00:00
Fernando Apesteguía
0d4a3ceea3 Add myself (fernape) to commiters-port.dot
Approved by:	tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D14639
2018-03-11 10:47:40 +00:00
Jochen Neumeister
ff2466d025 sorry for that. Fix next typo
Pointy hat to:	joneum
2018-03-11 08:07:40 +00:00
Jochen Neumeister
4cc384be4f Fix typo
Reported by:	tcberner
2018-03-11 08:02:14 +00:00
Jochen Neumeister
71fe8f948d Add myself to committers-ports.dot 2018-03-11 07:33:49 +00:00
Jamie Gritton
d0aee33dc9 Don't warn when the "hostname" rc variable is unset, but the hostname
is already non-empty (common in jails).
2018-03-10 20:13:07 +00:00
Warner Losh
c3d171bd18 Remove K&R stuff: never use it in new code.
Remove how to format K&R stuff. The project hasn't been using it in
new code for a long time. It's so obsolete, we don't need a statement
to never use it. Add a statement requesting that comments about
parameters be preserved when converting to ASNI style, per Kirk.

Differential Revision: https://reviews.freebsd.org/D14051
2018-03-09 17:54:14 +00:00
Hans Petter Selasky
e808190a59 Add kernel and userspace code to dump the firmware state of supported
ConnectX-4/5 devices in mlx5core.

The dump is obtained by reading a predefined register map from the
non-destructive crspace, accessible by the vendor-specific PCIe
capability (VSC). The dump is stored in preallocated kernel memory and
managed by the mlx5tool(8), which communicates with the driver using a
character device node.

The utility allows to store the dump in format
    <address> <value>
into a file, to reset the dump content, and to manually initiate the
dump.

A call to mlx5_fwdump() should be added at the places where a dump
must be fetched automatically. The most likely place is right before a
firmware reset request.

Submitted by:	kib@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2018-03-08 15:21:56 +00:00
Slava Shwartsman
479c9e50e1 Add myself and Hans Petter Selasky
Approved by:    hselasky (mentor), kib (mentor)
Sponsored by:   Mellanox Technologies
2018-03-08 14:33:59 +00:00
Eitan Adler
2045d4eb1e Chase rename of rwho script in r290252
The script and associated variable was changed in r290252. Now just
chase it.

MFC With:	r290252
Reported by:	Aaron LI <aly@aaronly.me>
2018-03-08 07:15:14 +00:00
Alan Somers
c8ed700a23 g_bio(9): fix a documentation oversight from r163870
MFC after:	3 weeks
2018-03-08 03:19:04 +00:00
Conrad Meyer
4e6bbdd6fe fpu_kern.9: Document fpu_kern_enter API change in r329878
While here, clean up some of the language.

Reported by:	delphij
Sponsored by:	Dell EMC Isilon
2018-03-07 18:31:31 +00:00
Ed Maste
28f52545ae Regen src.conf.5 after r330613 CROSS_TOOLCHAIN change 2018-03-07 17:37:36 +00:00
Ed Maste
89257265fb Disable LLD_BOOTSTRAP under WITHOUT_CROSS_COMPILER
LLD is a cross toolchain component. It shouldn't be built when
requesting a build without building a cross compiler.

(CROSS_COMPILER is somewhat unfortunately named; in any case, lld
should be treated as GNU binutils here.)

Submitted by:	Dan McGregor <dan.mcgregor at usask.ca>
MFC after:	1 week
2018-03-07 17:33:41 +00:00
Eitan Adler
f4d9593b2c psm.4: remove useless information
Obtained from:	DragonflyBSD (f49f67c528ec63f5524da5c11e060a0e67866242)
MFC After:	1 week
2018-03-07 09:40:41 +00:00
Devin Teske
5bf5ca772c Introduce dwatch(1) as a tool for making DTrace more useful
Reviewed by:	markj, gnn, bdrewery (earlier version)
Relnotes:	yes
Sponsored by:	Smule, Inc.
Differential Revision:	https://reviews.freebsd.org/D10006
2018-03-06 23:44:19 +00:00
Rodrigo Osorio
c293f08a32 Update the diskless manpage
According with /etc/rc.initdiskless the default mfs allocation
is now 5Mb (10240 x 512 bytes sectors)

Submitted by:	rodrigo
Reviewed by:	bcr
Approved by:	manpages (bcr)
Differential Revision:	https://reviews.freebsd.org/D14592
2018-03-06 14:31:15 +00:00
Warner Losh
d132d4ca60 Mention that CTLFLAG_MPSAFE is only for _PROC entries. 2018-03-04 06:19:41 +00:00
Warner Losh
982a973ebe Add documentation for CTLFLAG_MPSAFE. 2018-03-04 03:13:13 +00:00
Bryan Drewery
743ab0187f Ignore MAKEOBJDIRPREFIX from src-env.conf in sub-makes.
A sub-make, such as in 'make buildworld', may want to override MAKEOBJDIRPREFIX
but is unable to do so if src-env.conf is forcing it to another value.  Without
using '?=' the sub-make may use the wrong .OBJDIR.

Reported by:	eadler
Sponsored by:	Dell EMC
2018-03-03 23:23:01 +00:00
Hans Petter Selasky
f0fb0d583a Document pause_sig(9) and update prototypes for existing pause(9) and
pause_sbt(9) functions.

MFC after:	1 week
Suggested by:	cem@
Sponsored by:	Mellanox Technologies
2018-03-03 23:08:49 +00:00
Ian Lepore
1fe76c85dd Minor (mostly) wording changes. 2018-03-03 22:10:16 +00:00
Ian Lepore
19758005ab Minor changes to wording. 2018-03-03 21:41:16 +00:00
Oleksandr Tymoshenko
a1c11a0a7b [fdt_pinctrl] Add man pages for fdt_pinctrl driver
- Add fdt_pinctrl(4) with general information for the driver
- Add fdt_pinctrl(9) with fdt_pinctrl KPI description

Reviewed by:	ian, manu, wblock
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14235
2018-03-03 02:49:49 +00:00
Ravi Pokala
24f93aa05f imcsmb(4): Intel integrated Memory Controller (iMC) SMBus controller driver
imcsmb(4) provides smbus(4) support for the SMBus controller functionality
in the integrated Memory Controllers (iMCs) embedded in Intel Sandybridge-
Xeon, Ivybridge-Xeon, Haswell-Xeon, and Broadwell-Xeon CPUs. Each CPU
implements one or more iMCs, depending on the number of cores; each iMC
implements two SMBus controllers (iMC-SMBs).

*** IMPORTANT NOTE ***
Because motherboard firmware or the BMC might try to use the iMC-SMBs for
monitoring DIMM temperatures and/or managing an NVDIMM, the driver might
need to temporarily disable those functions, or take a hardware interlock,
before using the iMC-SMBs. Details on how to do this may vary from board to
board, and the procedure may be proprietary. It is strongly suggested that
anyone wishing to use this driver contact their motherboard vendor, and
modify the driver as described in the manual page and in the driver itself.
(For what it's worth, the driver as-is has been tested on various SuperMicro
motherboards.)

Reviewed by:	avg, jhb
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D14447
Discussed with:	avg, ian, jhb
Tested by:	allanjude (previous version), Panasas
2018-03-03 01:53:51 +00:00
Warren Block
d3e9ec3085 Clarity and style fixes.
Sponsored by:	iXsystems
2018-03-02 18:57:00 +00:00
Kyle Evans
b8f3641f0d Regenerate src.conf(5) after r330254 2018-03-01 22:04:51 +00:00
Warner Losh
f86dd99686 Create LOADER_UBOOT, and LOADER_OFW. Move these options out of
Makefile.${MACHINE_ARCH} and remove the now-empty files. Generate the
*32 directories on the necessary architectures (well, currently only
amd64) on the fly. Remove LOADER_EFI variable and co-locate it with
EFI.

Differential Review: https://reviews.freebsd.org/D14546
2018-03-01 19:50:55 +00:00
Bryan Drewery
a12a1b473b Allow overriding .MAKE.MAKEFILE_PREFERENCE.
This will be utilized by Ports tools to avoid some extra
stat(2) calls.

MFC after:	3 days
2018-02-28 20:06:03 +00:00
Alexander Motin
14e084ada5 Add support for Enhanced Gen 5 (16Gb) and Gen 6 (32Gb) QLogic FC HBAs.
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2018-02-28 16:24:32 +00:00
Kyle Evans
5373a0ae90 Regenerate src.conf(5) after r330118 2018-02-28 15:48:08 +00:00
Kyle Evans
a9810892bf Regenerate src.conf(5) after r330115 and r330116 2018-02-28 15:45:14 +00:00
Ed Maste
6f7527f0b7 Regen src.conf.5 after r330110 (WITH_KERNEL_RETPOLINE)
As a bonus also includes the LUA loader description.
2018-02-28 15:03:53 +00:00
Warner Losh
c1593b9ef2 Doc __DEFAULT_YES_OPTIONS, __DEFAULT_NO_OPTIONS and BROKEN_OPTIONS
in one paragraph to highlight the relationship between them.

Suggested by: kevans@
2018-02-27 17:36:01 +00:00
Warner Losh
9e74797f30 Move EFI up to common makefile. There's no need for all these .if's
based on architecture.

Sponsored by: Netflix
2018-02-27 17:35:29 +00:00
Kyle Evans
11d5ba38ab style.lua(9): Add some additional notes about naming and commas
camelCase tends to be preferred for function identifiers, while
internal_underscores are preferred for variable identifiers. This convention
makes it a little bit easier to eyeball whether variable/function usage is
correct.

The optional commas for final table values are preferred to reduce chances
for error.
2018-02-26 04:55:08 +00:00
Alan Somers
b8f7774edf tests: require ksh93 in the Kyuafiles for all atf-ksh93 test programs 2018-02-24 15:13:20 +00:00
Bryan Drewery
fc287c10fb Fix installation with read-only OBJDIR.
Reported by:	npn
Sponsored by:	Dell EMC
2018-02-24 01:33:17 +00:00
Alan Somers
2fae26bd8b Add the ZFS test suite
It was originally written by Sun as part of the STF (Solaris test framework).
They open sourced it in OpenSolaris, then HighCloud partially ported it to
FreeBSD, and Spectra Logic finished the port.  We also added many testcases,
fixed many broken ones, and converted them all to the ATF framework.  We've had
help along the way from avg, araujo, smh, and brd.

By default most of the tests are disabled.  Set the disks Kyua variable to
enable them.

Submitted by:	asomers, will, justing, ken, brd, avg, araujo, smh
Sponsored by:	Spectra Logic Corp, HighCloud
2018-02-23 16:31:00 +00:00
Alan Somers
b1d757bc1d libifconfig: multiple feature additions
Added the ability to:

* Create virtual interfaces
* Create vlan interfaces
* Get interface fib
* Get interface groups
* Get interface status
* Get nd6 info
* Get media status
* Get additional ifaddr info in a convenient struct
* Get vhids
* Get carp info
* Get lagg and laggport status
* Iterate over all interfaces and ifaddrs

And add more examples, too.

Note that this is a backwards-incompatible change. But that's ok, because it's
a private library.

MFC after:	3 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D14463
2018-02-23 03:11:43 +00:00
Ravi Pokala
dcd935dfd1 jedec_dimm(4): report asset info and temperatures for DDR3 and DDR4 DIMMs
A super-set of the functionality of jedec_ts(4). jedec_dimm(4) reports asset
information (Part Number, Serial Number) encoded in the "Serial Presence
Detect" (SPD) data on JEDEC DDR3 and DDR4 DIMMs. It also calculates and
reports the memory capacity of the DIMM, in megabytes. If the DIMM includes
a "Thermal Sensor On DIMM" (TSOD), the temperature is also reported.

Reviewed by:	cem
MFC after:	1 week
Relnotes:	yes
Sponsored by:	Panasas
Differential Revision:	https://reviews.freebsd.org/D14392
Discussed with:	avg, cem
Tested by:	avg, cem (previous version, no semantic changes)
2018-02-22 23:18:46 +00:00
Oleksandr Tymoshenko
94b8a54ae6 [chvgpio] add GPIO driver for Intel Z8xxx SoC family
Add chvgpio(4) driver for Intel Z8xxx SoC family. This product
was formerly known as Cherry Trail but Linux and OpenBSD drivers
refer to it as Cherry View. This driver is derived from OpenBSD
one so the name is kept for alignment with another BSD system.

Submitted by:	Tom Jones <tj@enoti.me>
Reviewed by:	gonzo, wblock(man page)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13086
2018-02-22 19:12:32 +00:00
Kyle Evans
b67fcf0b57 style.lua(9): Drop notes about semicolons
It is generally agreed upon that they are ugly and should not be used except
where needed.
2018-02-21 01:37:22 +00:00
Bryan Drewery
49a1108ae7 Move SVNVERSION_CMD into the one place that uses it.
This code, which is basically `svnversion || svnliteversion`, generates
2 fstatat(2) for every directory in PATH for every Makefile parsed that
includes bsd.own.mk.  This can add up for things like generating a Ports
index (Poudriere) or building a dependency graph for base.

Sponsored by:	Dell EMC
MFC after:	2 weeks
2018-02-20 21:48:16 +00:00
Kyle Evans
bb4b11cf98 style.lua(9): Clarify local variable guideline
The intent of this guideline is to avoid creating global variables in module
scope. Its main purpose is to serve as a reminder that variables at module
scope also need to be declared.

We want to avoid global variables in general, but this is easier to mess up
when designing things in the module scope.
2018-02-20 05:21:58 +00:00
Kyle Evans
e84e7ed5d5 style.lua(9): Note that wrapping at 80-columns is not rigid 2018-02-19 22:54:10 +00:00
Bryan Venteicher
7a16dacdfa Add PCI methods to iterate over the PCI capabilities
VirtIO V1 provides configuration in multiple VENDOR capabilities so this
allows all of the configuration to be discovered.

Reviewed by:	jhb
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D14325
2018-02-19 18:41:56 +00:00
Kyle Evans
037f68a994 Create style.lua(9)
This covers the lua style guidelines we've generally agreed on so far. It
will be revised as work continues and we run into more scenarios that need
specified.

Discussed with:	cem, jilles
Differential Revision:	https://reviews.freebsd.org/D14423
2018-02-19 01:25:52 +00:00
Warner Losh
48c1581df5 Add description for T specifier. It's for PNP keys that are checked
programatically that must be true for a device to match, but aren't in
the table as discrete fields.

Sponsored by: Netflix
2018-02-17 06:57:08 +00:00
Konstantin Belousov
2c64e2664b Note that on amd64 pmap_enter(psind = 1) works (since r321378).
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-02-16 01:08:32 +00:00
Conrad Meyer
6f4a47613b rc.conf.5: Flip default background_fsck language to match defaults
Reviewed by:	Daniel O'Connor <darius AT dons.net.au>
Sponsored by:	Dell EMC Isilon
2018-02-16 01:03:08 +00:00
Warner Losh
fcdb1f0317 Eliminate bsd.stand.mk and -fPIC 32-bit intel builds
OK. We don't really need a bsd.stand.mk, and it was causing a -fPIC
for the toolchain to be added (bogusly) when building on amd64. Pull
all relevant defs back into defs.mk and delete bsd.stand.mk.

This saves about 15-20k on i386 loader and zfsloader which when
combined with Lua give us a lot more stack space in those constrained
environments.
2018-02-16 00:17:32 +00:00
Stephen Hurd
cb980c3dca bnxt: Update man page with newly supported devices, options, etc
update man page with

* Newly supported devices
* Newly added options
* 'maintained by' Email ID

Submitted by:	Siva Kallam <siva.kallam@@broadcom.com>
Reviewed by:	shurd, sbruno
Approved by:	shurd
Sponsored by:	Broadcom Limited
Differential Revision:	https://reviews.freebsd.org/D13982
2018-02-15 18:39:43 +00:00
Conrad Meyer
d266177a8e pmap_qenter.9: Clarify that not all arch can map NX
The goal is to use security features when architectures provide them.

Reported by:	kib
Sponsored by:	Dell EMC Isilon
2018-02-15 18:19:25 +00:00
Eitan Adler
dc1a49a695 share: update pci_vendors to 2018.02.15
MFC After:	1 week
2018-02-15 11:13:21 +00:00
Conrad Meyer
27f6bdd04f pmap_qenter.9: Document API NX mapping
A follow-up to r329281.

Sponsored by:	Dell EMC Isilon
2018-02-14 23:47:04 +00:00
Eugene Grosbein
8be8c75688 ng_pppoe(8): add support for user-supplied Host-Uniq tag.
A few ISP filter PADI requests based on such tag,
to force the use of their own routers.
The custom Host-Uniq tag is passed in the NGM_PPPOE_CONNECT
control message, so it can be used with FreeBSD ppp(8)
and mpd without any other change.

Add support to send and receive PADM messages,
HURL and MOTM, often used by service providers to provide
ACS information and other configuration settings
to the user CPE.

Submitted by:	ale
Approved by:	mav (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D9270
2018-02-14 21:17:44 +00:00
Ed Maste
341458a0b6 Add DECLARE_MODULE_TIED mlink missed in r329244
Reported by:	imp
2018-02-13 21:33:40 +00:00
Ed Maste
920bdda857 Document DECLARE_MODULE_TIED
It was introduced in r213716.

Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2018-02-13 21:22:09 +00:00
Mark Johnston
6026dcd7ca Add support for zstd-compressed user and kernel core dumps.
This works similarly to the existing gzip compression support, but
zstd is typically faster and gives better compression ratios.

Support for this functionality must be configured by adding ZSTDIO to
one's kernel configuration file. dumpon(8)'s new -Z option is used to
configure zstd compression for kernel dumps. savecore(8) now recognizes
and saves zstd-compressed kernel dumps with a .zst extension.

Submitted by:	cem (original version)
Relnotes:	yes
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D13101,
			https://reviews.freebsd.org/D13633
2018-02-13 19:28:02 +00:00
Remko Lodder
ee5c94c18b Update the secteam/security officer list to match reality. 2018-02-13 15:13:43 +00:00
Conrad Meyer
4777ab9764 Take a first stab at documenting use of MODULE_PNP_INFO
Sponsored by:	Dell EMC Isilon
2018-02-12 22:42:06 +00:00
Warner Losh
7cafeaa1fd Add Lua as a scripting langauge to /boot/loader
liblua glues the lua run time into the boot loader. It implements all
the runtime routines that lua expects. In addition, it has a few
standard 'C' headers that nueter various aspects of the LUA build that
are too specific to lua to be in libsa. Many refinements from the
original code to improve implementation and the number of included lua
libraries. Use int64_t for lua_Number. Have "/boot/lua" be the default
module path. Numerous cleanups from the original GSoC project,
including hacking libsa to allow lua to be built with only one change
outside luaconf.h.

Add the final bit of lua glue to bring in liblua and plug into the
multiple interpreter framework, previously committed.

Add LOADER_LUA option, currently off by default.

Presently, this is an experimental option. One must opt-in to using
this by defining WITH_LOADER_LUA and WITHOUT_FORTH. It's been
lightly tested, so keep a backup copy of your old loader handy.
The menu code, coming in the next commit, hasn't been exhaustively
tested. A LUA boot loader is 60k larger than a FORTH one, which is
80k larger than a no-interpreter one. Subtle changes in size
may tip things past some subtle limit (the binary is ~430k now
when built with LUA). A future version may offer coexistance.

Bump FreeBSD version to 1200058 to mark the milestone.

Pedro Souza's 2014 Summer of Code project. Rui Paulo, Pedro Arthur,
Zakary Nafziger and Wojciech A. Koszek also contributed. Warner Losh
reworked it extensively into its current form.

Obtained from: https://wiki.freebsd.org/SummerOfCode2014/LuaLoader
Sponsored by: Google Summer of Code
Relnotes: Yes
MFC After: 1 month
Differential Review: https://reviews.freebsd.org/D14295
2018-02-12 15:31:53 +00:00
Conrad Meyer
4bc191c3dc device_add_child.9: reference logical opposite, device_delete_child(9) 2018-02-11 22:09:07 +00:00
Mark Felder
82004aa8e1 Add Thomas Zander to ports-secteam 2018-02-11 16:12:55 +00:00
Devin Teske
e6c0055599 Fix typo in dtrace_tcp(4)
Using args[2]->tcps_state as-documented results in error:
operator -> cannot be applied to pointer to type "void"

This error is accurate as the synopsis for tcp:::state-change is:
tcp:::state-change(void *, csinfo_t *, void *, tcpsinfo_t *, void *,
    tcplsinfo_t *);

args[2] refers to the third argument which is always NULL (as-
documented). The to-state for the TCP connection state transition is
actually in the fourth argument, args[3]->tcps_state.
2018-02-11 03:02:29 +00:00
Conrad Meyer
4b69e622d5 Document syscall_helper_register(9), syscall_helper_unregister(9) 2018-02-10 20:34:09 +00:00
Ed Maste
5b9c365429 Regen src.conf.5 after r329093, WITH_/WITHOUT_LLVM_COV 2018-02-10 00:27:29 +00:00
Ed Maste
1b49115a40 Promote llvm-cov to a standalone option
Introduce WITH_/WITHOUT_LLVM_COV to match GCC's WITH_/WITHOUT_GCOV.
It is intended to provide a superset of the interface and functionality
of gcov.

It is enabled by default when building Clang, similarly to gcov and GCC.

This change moves one file in libllvm to be compiled unconditionally.
Previously it was included only when WITH_CLANG_EXTRAS was set, but the
complexity of a new special case for (CLANG_EXTRAS | LLVM_COV) is not
worth avoiding a tiny increase in build time.

Reviewed by:	dim, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D142645
2018-02-10 00:22:35 +00:00
Warner Losh
8162ec9b35 We don't actually need env here, so drop it. All shells allow setting
of shell variables for the next command like this.
2018-02-09 15:50:32 +00:00
Jeb Cramer
23778da69d Add myself to committers-src.dot
Reviewed by:	erj (mentor)
Approved by:	erj (mentor)
2018-02-08 00:14:20 +00:00
Ed Maste
4816408016 add retpoline compiler and linker feature flags
These features indicate that the compiler and linker support the
retpoline speculative execution vulnerability (CVE-2017-5715)
mitigation.

Reviewed by:	dim, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D14228
2018-02-07 14:50:06 +00:00
Warner Losh
3182fd63c4 Avoid find -s, use find | sort instead.
find -s was introduced to make the metalog more
deterministic. However, find -s is not portable. find | sort is
portable and accomplishes the same goals, even if it isn't
pedantically the same. TZS is the same before / after the change so
any fussy differences between the two are moot and there won't be
METALOG churn across this change.

Differential Revision: https://reviews.freebsd.org/D14231
2018-02-06 23:12:16 +00:00
Dmitry Marakasov
52d7a78f17 - Document new ${name}_limits rc.conf option
Approved by:	cy
MFC after:	2 weeks (along with 328331 which introduced this option)
Differential Revision:	https://reviews.freebsd.org/D14028
2018-02-06 15:30:17 +00:00
Baptiste Daroussin
8134347f26 Remove libreadline from the source tree, all consumers but gdb
has been switched to libedit long ago, libreadline was built as an
internallib for a while and kept only for gdbtui which was broken using
libreadline.

Since gdb has been mostly deorbitted in all arches, gdbtui was only installed
on arm and sparc64, given it has been removed, gdb has been switched to use
libedit, no consumers are left for libreadline. Thus this removal
2018-02-06 12:22:42 +00:00
Bryan Venteicher
87dda4ed5d Correct structure name used in bus_map_resource(9) example
Reviewed by:	jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D14188
2018-02-06 04:28:21 +00:00
Landon J. Fuller
d177c19903 bwn(4): migrate bwn(4) to the native bhnd(9) interface, and drop siba_bwn.
- Remove the shim interface that allowed bwn(4) to use either siba_bwn or
  bhnd(4), replacing all siba_bwn calls with their bhnd(4) bus equivalents.
- Drop the legay, now-unused siba_bwn bus driver.
- Clean up bhnd(4) board flag defines referenced by bwn(4).

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13518
2018-02-05 23:38:15 +00:00
John Baldwin
d56b465cd5 Fix a typo. 2018-02-05 23:29:50 +00:00
Eitan Adler
bcc5c36fe5 pthread: adding missing header to man page
Reported by:	swildner@DragonFlyBSD.org
2018-02-03 20:50:46 +00:00
Alex Richardson
875b18b520 Revert r326375 since the warning has been turned off by default in clang
See https://reviews.llvm.org/D41512 and https://reviews.llvm.org/rL322901

Approved By:	brooks (mentor)

Differential Revision: https://reviews.freebsd.org/D14171
2018-02-02 22:09:36 +00:00
Rodney W. Grimes
49bc1b104e Fold constants and unify vnc variable names.
Approved by:	grehan (mentor)
MFC after:	3 days
2018-02-02 17:52:09 +00:00
Rodney W. Grimes
9e5bf7fb2a Clean up long lines.
Approved by:	grehan (mentor)
MFC after:	3 days
2018-02-02 16:35:17 +00:00
Rodney W. Grimes
40d9195e37 Add -n <network device emulation type> to usage synopsis
forgotten in r328695.

Fix long lines in usage.
Consistently use "default:" rather than "default is"

Approved by:	grehan (mentor)
MFC after:	3 days
2018-02-01 19:39:33 +00:00
Rodney W. Grimes
cb797f517d Add option '-n' network device emulation type which has a default of virtio-net
PR:		225558
Submitted by:	Johannes Lundberg <johalun0@gmail.com>
Approved by:	grehan (mentor)
MFC after:	3 days
2018-02-01 17:59:14 +00:00
Warner Losh
1f0e303c47 Bump .Dd 2018-01-31 23:16:54 +00:00
Warner Losh
13368c3830 Add the new armv7 architecture. 2018-01-31 23:16:19 +00:00
Edward Tomasz Napierala
a461a5c565 Document the new hw.usb.template behaviour.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2018-01-30 10:10:02 +00:00
Edward Tomasz Napierala
d3f19d3f57 Remove mention of sys/boot/ from hier(7), it doesn't exist anymore.
MFC after:	2 weeks
2018-01-27 00:09:43 +00:00
Eitan Adler
6058f7207a example cdev: use make_dev_s
Make use of make_dev_s in the example cdev. While here, fix warnings.

Reviewed by:	rpokala
2018-01-26 04:24:39 +00:00
Ed Maste
5436aaae64 vt: add Ctrl+/ key mapping
This matches Xorg's handling of Ctrl+/ and may be useful as a tmux
escape.

PR:		212197
Submitted by:	martin at sugioarto.com
Tested by:	Arshan Khanifar <arshankhanifar_gmail.com>
MFC after:	2 weeks
Relnotes:	Yes
2018-01-25 21:13:42 +00:00
Warner Losh
d3de39bff0 Bump .Dd date for c99 change 2018-01-25 15:55:58 +00:00
Warner Losh
88c53cfda1 Add info about c99 designationed initializers.
Differential Revision: https://reviews.freebsd.org/D13975
2018-01-25 15:42:21 +00:00
Ed Maste
5bb40331f6 uefi.8: describe architecture-specific default path
Sponsored by:	The FreeBSD Foundation
2018-01-25 14:36:47 +00:00
Ed Maste
084f772fb4 Install uefi.8 also on arm64
Our standard boot method for arm64 is via UEFI, so install the man page
that describes the boot process.

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-01-25 13:51:20 +00:00
Li-Wen Hsu
c676c939e2 Fix manual page install on non-amd64
Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D14038
2018-01-25 05:15:44 +00:00
Ed Maste
88df3117b3 Add efi.8 as a man page link to uefi.8
FreeBSD and industry has been inconsistent in the use of UEFI and EFI.
They are essentially just different versions of the same specification
and are often used interchangeably.  Make it easier for users to find
information by making efi(8) an alias for uefi(8).

Reported by:	imp, jhb
2018-01-24 21:39:40 +00:00
Ed Maste
9f747dc6dc uefi.8: add .Xr cross references to new efi tools 2018-01-24 21:26:01 +00:00
Ed Maste
e30f16baf2 uefi.8: note that UEFI and EFI are used interchangeably 2018-01-24 21:20:24 +00:00
Ed Maste
e20102cdda uefi.8: update HISTORY and remove incomplete AUTHORS
- EFI support appeared in 5.0 for ia64
- arm64 UEFI support added in 11.0

The AUTHORS section included the folks responsible for the bulk of the
work to bring UEFI support to amd64, but missed those who did the
original work on ia64, the initial port to i386, the ports to arm64 and
arm, and have generally maintained and improved general UEFI support
since then.  It's unwieldly to include everyone and would quickly become
outdated again anyhow, so just remove the AUTHORS section.

Reviewed by:	manu
Discussed with:	jhb
Differential Revision:	https://reviews.freebsd.org/D14033
2018-01-24 21:11:35 +00:00
Conrad Meyer
bd555da94b malloc(9): Change nominal size to size_t to match standard C
No functional change -- size_t matches unsigned long on all platforms.

Reported by:	bde
Discussed with:	jhb
Sponsored by:	Dell EMC Isilon
2018-01-24 19:37:18 +00:00
Xin LI
593ff55396 Document how to load nmdm(4) from a kernel module.
Submitted by:	kevlo
MFC after:	2 weeks
2018-01-23 03:36:49 +00:00
Poul-Henning Kamp
59e6efefac Add skeleton manual page for bcm283x_pwm
(Feel free to improve this)
2018-01-22 07:43:54 +00:00
Kyle Evans
b37f6c9805 Add libregex, connect it to the build
libregex is a regex(3) implementation intended to feature GNU extensions and
any other non-POSIX compliant extensions that are deemed worthy.

These extensions are separated out into a separate library for the sake of
not cluttering up libc further with them as well as not deteriorating the
speed (or lack thereof) of the libc implementation.

libregex is implemented as a build of the libc implementation with LIBREGEX
defined to distinguish this from a libc build. The reasons for
implementation like this are two-fold:

1.) Maintenance- This reduces the overhead induced by adding yet another
regex implementation to base.

2.) Ease of use- Flipping on GNU extensions will be as simple as linking
against libregex, and POSIX-compliant compilations can be guaranteed with a
REG_POSIX cflag that should be ignored by libc/regex and disables extensions
in libregex. It is also easier to keep REG_POSIX sane and POSIX pure when
implemented in this fashion.

Tests are added for future functionality, but left disconnected for the time
being while other testing is done.

Reviewed by:	cem (previous version)
Differential Revision:	https://reviews.freebsd.org/D12934
2018-01-22 02:44:41 +00:00
Eitan Adler
7e2c40ffa9 termcap: add xterm-termite
Obtained from:	DragonFly
MFC After:	1 week
2018-01-20 22:24:45 +00:00
Edward Tomasz Napierala
8e06491a4e Add sysctls to control device side USB identifiers. This makes it
possible to change string and numeric vendor and product identifiers,
as well as anything else there might be to change for a particular
device side template, eg the MAC address.

Reviewed by:	hselasky@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13920
2018-01-20 13:58:34 +00:00
Landon J. Fuller
a225321fbc bhnd/bwn(4): Define a bhnd(4) softmodem device class for the v.90 modem
codec core, and mark the core as unpopulated on all BCM4306 bwn(4) devices.

Sponsored by:	The FreeBSD Foundation
2018-01-19 22:43:08 +00:00
Warner Losh
4e617d8cb9 No need for the zero width space now that I put the comma in. 2018-01-18 22:23:16 +00:00
Warner Losh
36a910fba3 Make igor happier with this file:
o Don't use contractions.
o Add common after e.g. where needed
2018-01-18 22:20:30 +00:00
Kyle Evans
db180ae55c stand: Add /boot/overlays to allow separation of overlays from base FDT
This matches directory structure used commonly in Linux-land, and it's
cleaner than mixing overlays into the existing module paths. Overlays are
still mixed in by specifying fdt_overlays in loader.conf(5).

Reviewed by:	manu
Differential Revision:	https://reviews.freebsd.org/D13922
2018-01-18 04:58:54 +00:00
Baptiste Daroussin
27522b2c36 Update pciids to 2018.01.14
MFC after:	3 days
2018-01-17 13:25:41 +00:00
Kyle Evans
bab65a8418 wsp(4): Update to reflect new sysctl from r314467
r314467 introduced hw.usb.wsp.enable_single_tap_clicks to enable/disable
single-tap left click behavior. Update the man page to reflect the new
sysctl.

PR:		196624
MFC after:	3 days
X-MFC-With:	r314467
2018-01-15 21:53:33 +00:00
Peter Grehan
c81e664e74 The vmm(4) man page is conditional on MK_BHYVE.
Submitted by:	kevlo
2018-01-15 04:52:12 +00:00
Eitan Adler
da24a5e5be vmm(4): add to Makefile
r326281 added the vmm man page, but it needs to be installed.

PR:	205705
2018-01-14 20:30:58 +00:00
Kyle Evans
a9f41deff6 Introduce aw_syscon(4) for earlier attachment
Attaching syscon_generic earlier than BUS_PASS_DEFAULT makes it more
difficult for specific syscon drivers to attach to the syscon node and to
get ordering right. Further discussion yielded the following set of
decisions:

- Move syscon_generic to BUS_PASS_DEFAULT
- If a platform needs a syscon with different attach order or probe
behavior, it should subclass syscon_generic and match on the SoC specific
compat string
- When we come across a need for a syscon that attaches earlier but only
specifies compatible = "syscon", we should create a syscon_exclusive driver
that provides generic access but probes earlier and only matches if "syscon"
is the only compatible. Such fdt nodes do exist in the wild right now, but
we don't really use them at the moment.

Additionally:

- Any syscon provider that has needs any more complex than a spinlock solely
for syscon access and a single memory resource should subclass syscon
directly rather than attempting to subclass syscon_generic or add complexity
to it. syscon_generic's attach/detach methods may be made public should the
need arise to subclass it with additional attach/detach behavior.

We introduce aw_syscon(4) that just subclasses syscon_generic but probes
earlier to meet our requirements for if_awg and implements #2 above for this
specific situation. It currently only matches a64/a83t/h3 since these are
the only platforms that really need it at the time being.

Discussed with:	ian
Reviewed by:	manu, andrew, bcr (manpages, content unchanged since review)
Differential Revision:	https://reviews.freebsd.org/D13793
2018-01-13 18:46:31 +00:00
Pedro F. Giffuni
e50584405c Add SPDX identifier for the example license.
For project files we should use the -FreeBSD prefix but for this example
assume it is going to be used for some general purpose.

Submitted by:	kevlo
2018-01-13 18:28:30 +00:00
Ed Maste
1383b97864 Revert r327823, Enable ld.lld as bootstrap linker by default on i386
There's a report of some regression in ports.  Revert for now for an
exp run for this change in isolation (previous lld exp run also included
switching the linker used for ports to lld).

Also revert the src.conf.5 regeneration in r327824.

Reported by:	antoine
Sponsored by:	The FreeBSD Foundation
2018-01-13 04:00:55 +00:00
Bryan Drewery
2e07e232a2 Add a hack to disable AUTO_OBJ for 'old style' kernel builds.
Another solution would be to extend the Makefile.sys.inc idea, or a .no_obj
file, to more places but I would rather keep that limited to the top-level
build for now to not impact performance (statting a file in every make call)
or to bring unintended side-effects.

Reported by:	jhb, imp
Sponsored by:	Dell EMC Isilon
2018-01-12 01:09:41 +00:00
Mark Johnston
aeb8ee1709 Add mallocarray.9 to malloc.9's MLINKS.
X-MFC with:	r327674
2018-01-11 16:41:03 +00:00
Ed Maste
02cdaef069 regen src.conf.5 after r327823, WITH_LLD_BOOTSTRAP for i386
Sponsored by:	The FreeBSD Foundation
2018-01-11 14:21:07 +00:00
Ed Maste
973c4efb9d Enable ld.lld as bootstrap linker by default on i386
Akin to r327783 for amd64.  lld has been usable for amd64 for quite some
time, but a couple of issues remained that affected i386.  These were
recently addressed upstream in lld and merged into FreeBSD (r326831,
r326879, r326897, r326957), so we can now use ld.lld on i386 as well.

Similarly to amd64 this change enables lld only as the bootstrap linker
(used to link the kernel and userland libraries and executables), while
GNU ld.bfd is still installed as /usr/bin/ld and used for ports builds.

The ports collection is essentially ready to use lld as the system
linker for amd64, but many ports still have trouble with lld on i386,
because lld defaults to -ztext, disallowing relocations against readonly
segments.  Thus switching the system linker (WITH_LLD_IS_LD) will happen
later on a per-arch basis.

Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2018-01-11 14:03:05 +00:00
Conrad Meyer
0a8edd1cad malloc.9: Fix minor typo from rewording in r327796
Sponsored by:	Dell EMC Isilon
2018-01-10 22:20:49 +00:00
Conrad Meyer
c02fc9607a mallocarray(9): panic if the requested allocation would overflow
Additionally, move the overflow check logic out to WOULD_OVERFLOW() for
consumers to have a common means of testing for overflowing allocations.
WOULD_OVERFLOW() should be a secondary check -- on 64-bit platforms, just
because an allocation won't overflow size_t does not mean it is a sane size
to request.  Callers should be imposing reasonable allocation limits far,
far, below overflow.

Discussed with:	emaste, jhb, kp
Sponsored by:	Dell EMC Isilon
2018-01-10 21:49:45 +00:00
Ed Maste
737afa08a4 regen src.conf.5 after r327783, WITH_LLD_BOOTSTRAP default
(I missed the Reviewed by and review link from r327783.)

Reviewed by:	brooks, dim, bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D13827
2018-01-10 20:36:16 +00:00
Ed Maste
93b7a1c153 Enable ld.lld as bootstrap linker by default on amd64
For some time we have been planning to migrate to LLVM's lld linker.
Having a man page was the last blocking issue for using ld.lld to link
the base system kernel + userland, now addressed by r327770.  Link the
kernel and userland libraries and binaries with ld.lld by default, for
additional test coverage.

This has been a long time in the making.  On 2013-04-13 I submitted an
upstream tracking issue in LLVM PR 23214: [META] Using LLD as FreeBSD's
system linker.  Since then 85 individual issues were identified, and
submitted as dependencies.  These have been addressed along with two
and a half years of other lld development and improvement.

I'd like to express deep gratitude to upstream lld developers Rui
Ueyama, Rafael Espindola, George Rimar and Davide Italiano.  They put in
substantial effort in addressing the issues we found affecting
FreeBSD/amd64.

To revert to using ld.bfd as the bootstrap linker, in /etc/src.conf set

    WITHOUT_LLD_BOOTSTRAP=yes

If you need to set this, please follow up with a PR or post to the
freebsd-toolchain mailing list explaining how default WITH_LLD_BOOTSTRAP
failed for your use case.

Note that GNU ld.bfd is still installed as /usr/bin/ld, and will still
be used for linking ports.  ld.lld can be installed as /usr/bin/ld by
setting in /etc/src.conf

    WITH_LLD_IS_LLD=yes

A followup commit will set WITH_LLD_IS_LD by default, possibly after
Clang/LLVM/lld 6.0 is merged to FreeBSD.

Release notes:	Yes
Sponsored by:	The FreeBSD Foundation
2018-01-10 20:28:01 +00:00
Ed Maste
782df3ed34 src.conf.5: regen after r325692 and r326888
Sponsored by:	The FreeBSD Foundation
2018-01-10 18:15:00 +00:00
Konstantin Belousov
f489be8de9 Fix year.
Noted by:	oshogbo
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-01-09 16:28:45 +00:00
Mark Johnston
78f57a9cde Generalize the gzio API.
We currently use a set of subroutines in kern_gzio.c to perform
compression of user and kernel core dumps. In the interest of adding
support for other compression algorithms (zstd) in this role without
complicating the API consumers, add a simple compressor API which can be
used to select an algorithm.

Also change the (non-default) GZIO kernel option to not enable
compressed user cores by default. It's not clear that such a default
would be desirable with support for multiple algorithms implemented,
and it's inconsistent in that it isn't applied to kernel dumps.

Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D13632
2018-01-08 21:27:41 +00:00
Kristof Provost
fd91e076c1 Introduce mallocarray() in the kernel
Similar to calloc() the mallocarray() function checks for integer
overflows before allocating memory.
It does not zero memory, unless the M_ZERO flag is set.

Reviewed by:	pfg, vangyzen (previous version), imp (previous version)
Obtained from:	OpenBSD
Differential Revision:	https://reviews.freebsd.org/D13766
2018-01-07 13:21:01 +00:00
Kyle Evans
92e80162f3 aw_sid(4): Add support for Allwinner H3
The sid controller on the H3 is generally identical in location, size, and
efuse offset to the a64 and the a83t. The main difference is that the H3 has
a silicon bug that sometimes causes the rootkey (at least) to be garbled
unless first read by the prctl registers.

This device is currently not in our DTS and, as of now, is not yet present
in mainline Linux DTS.

Tested on:	OrangePi One
2018-01-07 04:59:28 +00:00
Konstantin Belousov
f3c588e171 Document kern.smp.disabled tunable.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-01-06 16:29:00 +00:00
Jason Unovitch
96de913b77 Remove myself from ports-secteam
I will be moving on to other life commitments this year and will not have
the time to support contributions as a ports committer, if able, until life
settles at the end of the year.

Discussed with:	portmgr
2018-01-04 17:58:48 +00:00
Navdeep Parhar
218c5b2115 cxgbe(4): Add a knob to enable/disable PCIe relaxed ordering. Disable it by
default when running on Intel CPUs.

This is a crude fix for the performance issues alluded to in these Linux commits:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=87e09cdec4dae08acdb4aa49beb793c19d73e73e
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a99b646afa8a02571ea298bedca6592d818229cd

MFC after:	1 week
Sponsored by:	Chelsio Communications
2018-01-03 19:24:57 +00:00
Eitan Adler
b5381607d7 bsd-family-tree: revert r327333
bsd-family-tree should only contain projects that have had actual
releases.

Requested by:	core
2018-01-03 03:46:28 +00:00
Mike Karels
d626b50b9d make SW_WATCHDOG dynamic
Enable the hardclock-based watchdog previously conditional on the
SW_WATCHDOG option whenever hardware watchdogs are not found, and
watchdogd attempts to enable the watchdog. The SW_WATCHDOG option
still causes the sofware watchdog to be enabled even if there is a
hardware watchdog. This does not change the other software-based
watchdog enabled by the --softtimeout option to watchdogd.

Note that the code to reprime the watchdog during kernel core dumps is
no longer conditional on SW_WATCHDOG. I think this was previously a bug.

Reviewed by:	imp alfred bjk
MFC after:	1 week
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D13713
2018-01-03 00:56:30 +00:00
Kyle Evans
0316d48587 aw_sid: Add man page for this driver
Reviewed by:	manu, bjk (both earlier version), brueffer (manpages)
Differential Revision:	https://reviews.freebsd.org/D13720
2018-01-02 14:54:54 +00:00
Warner Losh
133d84f4d1 Be less verbose and more precise. 2018-01-01 19:04:40 +00:00
Warner Losh
a1895a9244 Add note that assert.h may be included multiple times
with and without NDEBUG defined.
2018-01-01 18:59:11 +00:00
Warner Losh
c40f7c0583 assert(3) appeared first in the 7th Edition Unix, not the 6th, at
least according to the extant distributions preserved at tuhs.org.

Obtained from: http://www.tuhs.org/cgi-bin/utree.pl?file=V7/usr/include/assert.h
2018-01-01 18:55:13 +00:00
Eitan Adler
d3e909e7bb ieee80211(9): update man page
This copies changes from NetBSD into FreeBSD's man page.  I compared the
proposed changes against FreeBSD headers and modified them to match.

PR:		214602
Submitted by:	fehmi noyan isi <fnoyanisi@yahoo.com>
2018-01-01 00:20:35 +00:00
Bryan Venteicher
4d5c5d3ece Add rc.conf vxlan example
PR:	206288
Submitted by:	james@lodge.me.uk
MFC after:	2 weeks
2017-12-31 21:23:14 +00:00
Oleksandr Tymoshenko
29f61a2f42 vt(4): add support for configurable console palette
Introduce new set of loader tunables kern.vt.color.N.rgb, where N is a
number from 0 to 15. The value is either comma-separated list decimal
numbers ranging from 0 to 255 that represent values of red, green, and
blue components respectively (i.e. "128,128,128") or 6-digit hex triplet
commonly used to represent colors in HTML or xterm settings (i.e. #808080)

Each tunable overrides one of the 16 hardcoded palette codes and can be set
in loader.conf(5)

Reviewed by:	bcr(docs), jilles, manu, ray
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D13645
2017-12-31 20:21:05 +00:00
Ian Lepore
e93e5bb0fa Allow use of .WAIT in the LOCAL_DIRS and LOCAL_LIB_DIRS lists.
A comment in Makefile.inc1 has long stated that LOCAL_DIRS are built last,
after the base system.  Incremental improvements in parallel building over
the years have led to LOCAL_DIRS being built in parallel with base system
directories.  This change allows the .WAIT directive to appear in LOCAL_DIRS
and LOCAL_LIB_DIRS lists to give the user some control over parallel
building of local additions.

Differential Revision:	https://reviews.freebsd.org/D13622
2017-12-31 18:53:13 +00:00
Eitan Adler
1a1620dc88 skel: Quote PAGER in dot.shrc
PR:		181853
Submitted by:	pl@catslair.org
MFC After:	1 week
2017-12-31 06:58:58 +00:00
Eitan Adler
9faaeffdbd examples: fix typo 2017-12-29 23:58:05 +00:00
Maxim Konovalov
cad0074dd6 Sort by time. 2017-12-29 21:37:36 +00:00
Ian Lepore
fe9c9058e8 Correct a mistake and reword a couple sentences to clarify that "the value"
refers to the scale value, not the kmem_arena size that results from scaling.

Suggested by: alc@
2017-12-29 20:00:19 +00:00
Eitan Adler
294a9f4f9e locale: add cnr (Montenegrin)
See https://www.loc.gov/standards/iso639-2/php/code_changes.php
2017-12-29 15:04:49 +00:00
Eitan Adler
96287fcda8 bsd-family-tree: add NetBSD 7.1.1; correct NetBSD abbrev
Reported by:	Herbert J. Skuhra <herbert@gojira.at>
Reported by:	N.J. Mann <njm@njm.me.uk>
2017-12-29 14:31:43 +00:00
Eitan Adler
b6d439667a bsd-family-tree: add NetBSD 6.0.6
This was a missing release. Released on the same day as 6.1.5 per
https://blog.netbsd.org/tnf/entry/netbsd_6_1_5_and
2017-12-29 05:01:07 +00:00
Eitan Adler
7235fc2e94 bsd-family-tree: add HardenedBSD
This adds HardenedBSD which is a pseudo-fork of FreeBSD. It hasn't had a
release yet, but does does have active users and a community. As such
document it as a branch off of FreeBSD-stable. Ideally this adds enough
space so that future releases are easy enough to add.
2017-12-29 04:49:59 +00:00
Eitan Adler
089d1ca8fb Update pci_vendors to 2017.12.20 2017-12-28 08:25:47 +00:00
Eitan Adler
6b35d82c34 Fix a few speelling errors
- man pages
- bin/sh

Reviewed by:		jilles
2017-12-28 08:22:26 +00:00
Xin LI
a9a7c8c0a1 Replace send-mail with the more standarized sendmail, we do not create
links for send-mail in mailwrapper so it did not work anyway.

MFC after:	2 weeks
2017-12-27 06:23:50 +00:00
Ian Lepore
45ab79431b Add a section describing how to tune ARM kernel options to use an MD_ROOT
filesystem larger than about 50-55 MiB.

The description of VM_KMEM_SIZE_SCALE is roughly as hand-wavy as my
understanding of the option, but at least mentioning that it's a factor
and giving an empirical datapoint that works will give folks some idea
of what to tweak if they have problems.
2017-12-26 22:05:55 +00:00
Ian Lepore
004b0e1ba9 Complete the changing of the old "i2c-address" property to the modern "reg"
property by updating the description text to match the updated example.

This should have been part of r327220
2017-12-26 18:42:29 +00:00
Ian Lepore
685f2b87ab Update the FDT example for the lm75 sensor to match current devicetree
standards and what the existing driver expects.

Also change 'like' to 'such as' where the text is providing an example
rather than a simile.
2017-12-26 18:34:07 +00:00
Emmanuel Vadot
1f33276ab5 man4: Move back allwinner man page to share/man/man4
But only install them for arm or aarch64 since they are used on both arch.
2017-12-26 16:50:49 +00:00
Emmanuel Vadot
ce3eafc4a5 Move arm specific man page to man4.arm subfolder
Reported by:	ian
2017-12-26 16:13:20 +00:00
Emmanuel Vadot
81b5c8ff8d Allwinner: gpio: Rename driver to aw_gpio and add man page for it
Reviewed by:	bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D13617
2017-12-26 12:11:04 +00:00
Emmanuel Vadot
b5be541f1d Allwinner: mmc: Rename driver to aw_mmc and add a man page for it
Reviewed by:	bcr (manpages)
Differential Revision:	https://reviews.freebsd.org/D13616
2017-12-26 12:06:56 +00:00
Emmanuel Vadot
bc5719c817 aw_rtc.4: Correct some error/style found by mandoc -Tlint 2017-12-26 10:59:54 +00:00
Emmanuel Vadot
8bef6873e5 aw_rsb.4: Remove useless .Re 2017-12-25 23:01:09 +00:00
Emmanuel Vadot
96e286a7f8 aw_rtc: Add man page for this driver
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D13621
2017-12-25 19:42:04 +00:00
Dimitry Andric
dd5c0d9d4b Follow-up to r326375, by moving the block that disables errors on the
new clang 6.0.0 -Wtautological-constant-compare warning to the WARNS <=
6 level.  (This warning is still being worked on upstream to reduce
false positives, but it is currently still too trigger happy.)
2017-12-24 16:34:54 +00:00
Sevan Janiyan
0f33cc3472 Drop the NetBSD rcs tag introduced in r326868.
Approved by:    bcr (mentor)
Differential Revision:  https://reviews.freebsd.org/D13511
2017-12-22 21:54:39 +00:00