Commit Graph

17885 Commits

Author SHA1 Message Date
Ruslan Bukin
7804dd5212 Add full softfloat and hardfloat support for RISC-V.
Hardfloat is now default (use riscv64sf as TARGET_ARCH
for softfloat).

Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8529
2016-11-16 15:21:32 +00:00
Christian Brueffer
443788c267 Various minor cleanups. 2016-11-16 13:22:57 +00:00
Alexander Kabaev
d037279cc0 Set endianness and floating point flags explicitly for MIPS targets
The tree can be build with an external toolchain that will not
necessarily default to desired settings, so we have to specify
the required flags explicitly to force the required compilation
mode.

Reviewed by:	adrian, br
Sponsored by:	https://reviews.freebsd.org/D8505
2016-11-16 03:19:36 +00:00
Alan Cox
4fab83fffc Update to reflect the demise of PG_CACHED pages.
Reviewed by:	kib, markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8530
2016-11-16 02:51:24 +00:00
Stephen Hurd
d933e97f9d New driver for Broadcom NetXtreme-C and NetXtreme-E devices.
This driver uses the iflib framework supporting Broadcom
25/50Gbps devices.

Reviewed by:	gallatin, wblock
Approved by:	davidch
MFC after:	2 weeks
Relnotes:	yes
Sponsored by:	Broadcom Limited
Differential Revision:	https://reviews.freebsd.org/D7551
2016-11-15 20:35:29 +00:00
Dexuan Cui
4085e878b6 Add myself (dexuan) as a src committer and sephe as my mentor.
Approved by:	sephe (mentor)
2016-11-15 09:20:28 +00:00
Julian Elischer
06723a8e57 When you select make OLDTIMEZONES=1 then you need a few added directories
to be made or the command fails

Sponsored by:	panzura
2016-11-15 06:37:44 +00:00
Sepherosa Ziehau
168fce73b5 hyperv/vss: Add driver and tools for VSS
VSS stands for "Volume Shadow Copy Service".  Unlike virtual machine
snapshot, it only takes snapshot for the virtual disks, so both
filesystem and applications have to aware of it, and cooperate the
whole VSS process.

This driver exposes two device files to the userland:

    /dev/hv_fsvss_dev

    Normally userland programs should _not_ mess with this device file.
    It is currently used by the hv_vss_daemon(8), which freezes and
    thaws the filesystem.  NOTE: currently only UFS is supported, if
    the system mounts _any_ other filesystems, the hv_vss_daemon(8)
    will veto the VSS process.

    If hv_vss_daemon(8) was disabled, then this device file must be
    opened, and proper ioctls must be issued to keep the VSS working.

    /dev/hv_appvss_dev

    Userland application can opened this device file to receive the
    VSS freeze notification, hold the VSS for a while (mainly to flush
    application data to filesystem), release the VSS process, and
    receive the VSS thaw notification i.e. applications can run again.

    The VSS will still work, even if this device file is not opened.
    However, only filesystem consistency is promised, if this device
    file is not opened or is not operated properly.

hv_vss_daemon(8) is started by devd(8) by default.  It can be disabled
by editting /etc/devd/hyperv.conf.

Submitted by:	Hongjiang Zhang <honzhan microsoft com>
Reviewed by:	kib, mckusick
MFC after:	3 weeks
Sponsored by:	Microsoft
Differential Revision:	https://reviews.freebsd.org/D8224
2016-11-15 02:36:12 +00:00
Edward Tomasz Napierala
32a455e090 Fix function prototypes in usbdi(9) man page, and tweak it a little.
MFC after:	1 month
2016-11-14 10:41:04 +00:00
Brad Davis
3f558d0b91 Attempt to make the parts that people are supposed to change stand out more
by capitalizing them.

Approved by:	dteske
2016-11-13 17:28:32 +00:00
Bryan Drewery
df5b485a4f Fix 'rebuild during install' error to only trigger on 'make install'.
This allows 'make foo install' or 'make all install'.  It is a similar
fix as r304697 did for reading dependency files.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-13 00:11:09 +00:00
Bryan Drewery
34d39d2c4e DIRDEPS_BUILD: Consolidate some logic for skipping of reading Makefile.depend.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-13 00:11:05 +00:00
Bryan Drewery
d7173250be Consolidate the "don't build" optimizations into _SKIP_BUILD.
_SKIP_BUILD will be set when nothing is expected to be built.  This can
be used to optimize some tree-walks and operations which don't need to
load dependency files or generate dependencies via beforebuild-style
hacks.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-13 00:11:02 +00:00
Bryan Drewery
f4fbac1931 DIRDEPS_BUILD: Don't hook 'beforebuild' into 'all' in MAKELEVEL 0.
This was a mistake in r295641, but is effectively prevented from
being a problem due to r296699 preventing 'make all' from being
usable at MAKELEVEL 0 for DIRDEPS_BUILD.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-13 00:10:59 +00:00
Bryan Drewery
1deef6e403 Always set CLEANFILES, even if not building.
This will ensure that 'make clean' does the right thing.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2016-11-13 00:10:56 +00:00
Benedict Reuschling
fbc19213d5 Fix a broken link to the USB audio class specs.
PR:		214240
Submitted by:	Tobias Kortkamp t@tobik.me
MFC after:	5 days
2016-11-12 19:45:55 +00:00
Konrad Witaszczyk
7232d69b0b Add myself (def) as a src committer and pjd as my mentor.
Approved by:	pjd (mentor)
2016-11-12 18:04:03 +00:00
Andriy Voskoboinyk
a14f9888d9 rtwn: enable 11n support for RTL8188CE.
- Increase Rx buffer size from MCLBYTES to MJUMPAGESIZE.
- Provide an additional defragmentation routine for frames larger
than MCLBYTES; that is required by A-MSDU / Atheros Fast-Frames
support to work with current Tx path implementation.

Enabled features list for RTL8188CE:
- Atheros Fast-Frames;
- A-MPDU (Tx / Rx);
- A-MSDU (Tx / Rx; 4k only);
- Short Guard Interval.

Tested with:
- RTL8188CE (STA+AP) + RTL8821AU (STA).
- RTL8188CE (STA) + RTL8188CUS (AP).

Relnotes:	yes
2016-11-12 17:58:37 +00:00
Andriy Gapon
f1cd40a19d update SMB_BWRITE documentation, clarify SMB_BREAD
After removal of SMB_TRANS some information in the description of
SMB_BWRITE has become stale.  E.g., the maximum block size has been
restored to 32.

Also, the descriptions of SMB_BREAD and SMB_BWRITE had some
incorrect information on the SMBus protocol details.

MFC after:	1 week
X-MFC with:	r308242
Differential Revision: https://reviews.freebsd.org/D8431
2016-11-11 15:16:37 +00:00
Bryan Drewery
1bec4c5b3d Use proper MACHINE_ARCH.
This fixes ports on mips after r308130.
2016-11-03 19:39:32 +00:00
Ruslan Bukin
2ad1d09f16 o Add support for long double.
o Add support for latest RISC-V GNU toolchain.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-11-03 13:06:17 +00:00
Andriy Gapon
19a8946bce smbus: remove smbus_trans / SMB_TRANS
This change reverts most of r281985.

The method did not map to anything defined by SMBus protocol and could
not be implemented for SMBus controllers.

This change is obviously not backwards compatible, but I have good
reasons to believe that there have never been any users of SMB_TRANS.

Discussed with:	grembo, jhb
MFC after:	6 weeks
2016-11-03 07:40:52 +00:00
Jonathan Anderson
e4195e2e12 Add rules to build LLVM IR binaries and libraries.
Running `make libfoo.ll` or `make libfoo.bc` within a library directory
will now give us an LLVM IR version of the library, and `make foo.full.ll`
or `make foo.full.bc` will give us an IR version of a binary.

As part of this change, we add an LLVM_LINK variable to sys.mk that can be
specified/overridden using an external toolchain.

Reviewed by:	bdrewery, brooks
Approved by:	rwatson (mentor)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D8388
2016-11-01 21:27:42 +00:00
Glen Barber
2d5386cc2c Fix packaging /usr/share/examples/etc.
Reported by:	woodsb02
MFC after:	3 days
X-MFC-With:	r308148
Sponsored by:	The FreeBSD Foundation
2016-10-31 21:11:46 +00:00
Ruslan Bukin
5bca221511 Add full softfloat and hardfloat support for MIPS.
This adds new target architectures for hardfloat:
mipselhf mipshf mips64elhf mips64hf.

Tested in QEMU only.

Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D8376
2016-10-31 15:33:58 +00:00
Kevin Lo
a24d62b533 Add preliminary support for the RTL8153.
Reviewed by:	hselasky
2016-10-31 05:58:11 +00:00
Andriy Gapon
448897d366 add iic interface to ig4 driver, move isl and cyapa to iicbus
Summary:
The hardware does not expose a classic SMBus interface.
Instead it has a lower level interface that can express a far richer
I2C protocol than what smbus offers.  However, the interface does not
provide a way to explicitly generate the I2C stop and start conditions.
It's only possible to request that the stop condition is generated
after transferring the next byte in either direction.  So, at least
one data byte must always be transferred.
Thus, some I2C sequences are impossible to generate, e.g., an equivalent
of smbus quick command (<start>-<slave addr>-<r/w bit>-<stop>).

At the same time isl(4) and cyapa(4) are moved to iicbus and now they use
iicbus_transfer for communication.  Previously they used smbus_trans()
interface that is not defined by the SMBus protocol and was implemented
only by ig4(4).  In fact, that interface was impossible to implement
for the typical SMBus controllers like intpm(4) or ichsmb(4) where
a type of the SMBus command must be programmed.

The plan is to remove smbus_trans() and all its uses.
As an aside, the smbus_trans() method deviates from the standard,
but perhaps backwards, FreeBSD convention of using 8-bit slave
addresses (shifted by 1 bit to the left).  The method expects
7-bit addresses.

There is a user facing consequence of this change.
A user must now provide device hints for isl and cyapa that specify an iicbus to use
and a slave address on it.
On Chromebook hardware where isl and cyapa devices are commonly found
it is also possible to use a new chromebook_platform(4) driver that
automatically configures isl and cyapa devices.  There is no need to
provide the device hints in that case,

Right now smbus(4) driver tries to discover all slaves on the bus.
That is very dangerous.  Fortunately, the probing code uses smbus_trans()
to do its job, so it is really enabled for ig4 only.
The plan is to remove that auto-probing code and smbus_trans().

Tested by:	grembo, Matthias Apitz <guru@unixarea.de> (w/o
		chromebook_platform)
Discussed with:	grembo, imp
Reviewed by:	wblock (docs)
MFC after:	1 month
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D8172
2016-10-30 12:15:33 +00:00
Dimitry Andric
c4e24caf4e Revert r307823 (Use upstream suffixes for LLVM IR) for now. It causes a
number of ports to fail, which use bmake, and use .ll file extensions
(usually for for C++-based lex input).

Reported by:	antoine
2016-10-27 18:46:52 +00:00
Marcel Moolenaar
5b424cba0a Detect clang on macOS. The version string is slightly different. 2016-10-24 17:59:25 +00:00
Dimitry Andric
ce1e4668de Use upstream suffixes for LLVM IR
In r307676, several make rules were added for LLVM IR files, both in
text and binary format.  Unfortunately these use different suffixes from
what upstream uses:
* Text IR has upstream suffix ".ll", while r307676 uses ".llo"
* Binary IR has upstream suffix ".bc", while r307676 uses ".bco"

Change these to what upstream uses instead.

Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D8326
2016-10-23 14:28:29 +00:00
Baptiste Daroussin
439df1f0d4 Remove reference to RCS from PSD titles 2016-10-22 23:09:06 +00:00
Baptiste Daroussin
f8e856f8bd Remove RCS entry from PSD content file, it is gone along with GNU RCS 2016-10-22 23:05:44 +00:00
Baptiste Daroussin
a358681e90 Import pci_vendors 2016.10.20 2016-10-22 19:36:12 +00:00
Andriy Gapon
4afdfe9761 jedec_ts: a driver for thermal sensors on memory modules
The driver currently supports chips that are fully compliant with the
JEDEC SPD / EEPROM / TS standard (JEDEC Standard 21-C,
TSE2002 Specification, frequenlty referred to as JEDEC JC 42.4).

Additionally some chips from STMicroelectronics are supported as well.
They are compliant except for their Device ID pattern.

Given the continued lack of any common sensor infrastructure, the driver
uses an ad-hoc sysctl to report the temperature.

Reviewed by:	wblock (documentation)
MFC after:	2 weeks
Relnotes:	yes
Differential Revision: https://reviews.freebsd.org/D8174
2016-10-22 08:00:46 +00:00
Justin Hibbits
dc9b124d66 Create a new MACHINE_ARCH for Freescale PowerPC e500v2
Summary:
The Freescale e500v2 PowerPC core does not use a standard FPU.
Instead, it uses a Signal Processing Engine (SPE)--a DSP-style vector processor
unit, which doubles as a FPU.  The PowerPC SPE ABI is incompatible with the
stock powerpc ABI, so a new MACHINE_ARCH was created to deal with this.
Additionaly, the SPE opcodes overlap with Altivec, so these are mutually
exclusive.  Taking advantage of this fact, a new file, powerpc/booke/spe.c, was
created with the same function set as in powerpc/powerpc/altivec.c, so it
becomes effectively a drop-in replacement.  setjmp/longjmp were modified to save
the upper 32-bits of the now-64-bit GPRs (upper 32-bits are only accessible by
the SPE).

Note: This does _not_ support the SPE in the e500v1, as the e500v1 SPE does not
support double-precision floating point.

Also, without a new MACHINE_ARCH it would be impossible to provide binary
packages which utilize the SPE.

Additionally, no work has been done to support ports, work is needed for this.
This also means no newer gcc can yet be used.  However, gcc's powerpc support
has been refactored which would make adding a powerpcspe-freebsd target very
easy.

Test Plan:
This was lightly tested on a RouterBoard RB800 and an AmigaOne A1222
(P1022-based) board, compiled against the new ABI.  Base system utilities
(/bin/sh, /bin/ls, etc) still function appropriately, the system is able to boot
multiuser.

Reviewed By:	bdrewery, imp
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D5683
2016-10-22 01:57:15 +00:00
Dimitry Andric
e5e40621d1 Fix building of many ports that use make from base, such as devel/apr1,
after r307676, which added transformation rules for .llo and .bco files.

These suffixes also have to be added the the global .SUFFIXES target,
otherwise the various suffix-transformation rules would be interpreted
as literal targets.  E.g.,

.c.bco:
	... commands ...

would actually to build a file named ".c.bco".
2016-10-21 21:52:22 +00:00
Michael Tuexen
202a205fc2 Fix a grammar error.
Reported by:i hiren, vangyzen
MFC after: 1 month
X-MFC:	r307727
Sponsored by: Netflix
2016-10-21 18:45:09 +00:00
Ed Maste
1c32eff59b Allow all subdirectories to be optional via SUBDIR.${MK_*}
Reviewed by:	br, imp
Tested by:	br
Pointy hat to:	emaste
Differential Revision:	https://reviews.freebsd.org/D8317
2016-10-21 17:25:19 +00:00
Michael Tuexen
b8835a8a6b Document the TCP sysctl variables insecure_rst and insecure_syn.
MFC after: 1 month
Sponsored by: netflix
2016-10-21 11:29:25 +00:00
Jung-uk Kim
69d410eeb1 Implement BPF_MOD and BPF_XOR instructions.
These two ALU instructions first appeared on Linux.  Then, libpcap adopted
and made them available since 1.6.2.  Now more platforms including NetBSD
have them in kernel.  So do we.
 --이 줄 이하는 자동으로 제거됩니다--
2016-10-21 06:55:07 +00:00
Ed Maste
8e71e1129f arch.7: correct typo in predefined macro example
The example incorrectly used -Dm, which defines macro m with value 1.
It is supposed to be -dM, which lists macros.
2016-10-20 20:16:10 +00:00
Jonathan Anderson
c867306e60 Add make rules to build LLVM IR from C/C++ sources.
As a foundation for future work with LLVM's Intermediate Representation (IR),
add new suffix rules that can be used to build .llo (text) or .bco (bitcode)
files from C or C++ sources.  This compilation step uses the same CFLAGS, etc.,
as are used for building .o files, with the exception of optimization flags.
Many of the things we would like to do with IR (e.g., instrumentation) work
better with unoptimized code, so our approach is to build .c->.bco without
optimization and then apply the optimization in post-analysis,
post-instrumentation linking.

The overall result of these changes is:

* one can "make foo.llo" or "make foo.bco" wherever "make foo.o" was supported
* new make variables IR_CFLAGS and IR_CXXFLAGS are available to inspect the
  flags that are used by Clang to generate the IR

These new rules are added unconditionally to our non-POSIX suffix rule set,
since we cannot inspect COMPILER_TYPE in sys.mk.  Future changes that depend
on these rules (e.g., building IR versions of binaries from bsd.prog.mk)
should use COMPILER_TYPE to determine when we can expect IR rules to succeed.

Reviewed by:	emaste, imp
Approved by:	rwatson (mentor)
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D4339
2016-10-20 15:14:21 +00:00
Ed Maste
94ff3d0344 Add knobs to make GNU diff and GNU grep optional
This is added to facilitate experiments building FreeBSD without
copyleft software.

If WITHOUT_GNU_DIFF is set no /usr/bin/diff or /usr/bin/diff3 will
be built.

If WITHOUT_GNU_GREP is set then BSD grep will be installed as
/usr/bin/bsdgrep or /usr/bin/grep, depending on the WITH_BSD_GREP
knob.

Reviewed by:	brooks (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	Differential Revision: https://reviews.freebsd.org/D8288
2016-10-20 14:48:57 +00:00
Andrew Turner
6ed982a221 Add support for the fpu_kern(9) KPI on arm64. It hooks into the existing
VFP code to store the old context, with lazy loading of the new context
when needed.

FPU_KERN_NOCTX is missing as this is unused in the crypto code this has
been tested with, and I am unsure on the requirements of the UEFI
Runtime Services.

Reviewed by:	kib
Obtained from:	ABT Systeems Ltd
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D8276
2016-10-20 09:22:10 +00:00
Ed Maste
fa0b35857f Force MK_GDB to no if MK_BINUTILS == no
This is currently encoded in conditional blocks in gnu/lib/Makefile and
gnu/usr.bin/Makefile. Set it via src.opts.mk to make GDB's dependency
on binutils more clear.
2016-10-19 19:57:36 +00:00
Luigi Rizzo
fbb9e715c0 fix a stale sentence in the manpage 2016-10-18 15:24:56 +00:00
Marcel Moolenaar
e7c08366e7 Add LORDER, TSORT and TSORTFLAGS variables and replace the
hardcoded utility names and tsort flags.
2016-10-18 01:42:42 +00:00
Andriy Voskoboinyk
2616dd0b80 Fix dates + add an UPDATING entry. 2016-10-17 21:35:13 +00:00
Andriy Voskoboinyk
7453645f2a rtwn(4), urtwn(4): merge common code, add support for 11ac devices.
All devices:
- add support for rate adaptation via ieee80211_amrr(9);
- use short preamble for transmitted frames when needed;
- multi-bss support:
 * for RTL8821AU: 2 VAPs at the same time;
 * other: 1 any VAP + 1 sta VAP.
RTL8188CE:
- fix IQ calibration bug (reason of significant speed degradation);
- add h/w crypto acceleration support.
USB:
- A-MPDU Tx support;
- short GI support;
Other:
- add support for RTL8812AU / RTL8821AU chipsets
(a/b/g/n only; no ac yet);
- split merged code into subparts:
 * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*)
 * common (if_rtwn*)
 * chip-specific (rtl*/*)
- various other bugfixes.

Due to code reorganization, module names / requirements were changed too:
urtwn urtwnfw -> rtwn rtwn_usb rtwnfw
rtwn  rtwnfw  -> rtwn rtwn_pci rtwnfw

Tested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU.

Tested by:	kevlo, garga,
		Peter Garshtja <peter.garshtja@ambient-md.com>,
		Kevin McAleavey <kevin.mcaleavey@knosproject.com>,
		Ilias-Dimitrios Vrachnis <id@vrachnis.com>,
		<otacilio.neto@bsd.com.br>
Relnotes:	yes
2016-10-17 20:38:24 +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