Commit Graph

209274 Commits

Author SHA1 Message Date
Wojciech Macek
a2862b1169 Add support for Enhanced Allocation in pciconf
* Modified pciconf to print EA capability structure
 * Added register description to pcireg.h

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           jhb
Differential revision: https://reviews.freebsd.org/D5440
2016-02-26 08:35:04 +00:00
Stanislav Galabov
de867427d8 So far bsd.stand.mk wasn't included in the following files:
sys/boot/fdt/Makefile
sys/boot/uboot/fdt/Makefile
sys/boot/uboot/lib/Makefile

This causes compilation issues on MIPS due to trying to link PIC with non-PIC
code. This revision includes bsd.stand.mk in the above files.

Reviewed by:	imp
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5311
2016-02-26 08:16:44 +00:00
Stanislav Galabov
8b2db3b713 Currently BERI's loader is including the 32-bit version of the FICL MIPS sysdep.h (sys/boot/ficl/mips/sysdep.h) instead of the 64-bit version (sys/boot/ficl/mips64/sysdep.h).
Although this may not be an issue in practice, it would be more correct if the 64-bit version was used. Also, using the 64-bit version would make it easier to add support for 64-bit ubldr on MIPS.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5310
2016-02-26 08:06:25 +00:00
Adrian Chadd
0b3105a37d Add modules support for the bhnd code.
Submitted by:	Landon Fuller <landonf@landonf.org>
Obtained from:	https://github.com/landonf/freebsd/compare/user/landonf/bcm4331-CURRENT
2016-02-26 03:34:32 +00:00
Adrian Chadd
4ad7e9b01a Bring over the initial rewrite of the broadcom bus support found in their
SoCs and various chips (including, famously, their wifi chips.)

This is "just" (all 20,000 lines of it) code to enumerate the various
versions of busses inside these devices, including the PCI bridge and
the direct SIBA bridge found in MIPS chips.

It also includes shared code for some bus operations (suspend, resume, etc);
EEPROM/SROM/etc parsing and other things that are shared between chips.

Eventually this'll replace the code that bwi/bwn uses for the internal
bus, as well as some apparently upcoming mips74k broadcom SoC support
which uses bwn!

Thanks to Landon Fuller <landonf@landonf.org> for all this work!

Obtained from:	https://github.com/landonf/freebsd/compare/user/landonf/bcm4331-CURRENT
2016-02-26 03:34:08 +00:00
Sepherosa Ziehau
9021e53b29 hyperv: Use atomic_fetchadd_int to get GPADL id.
Reviewed by:	Hongjiang Zhang <honzhan microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5439
2016-02-26 02:26:19 +00:00
Bryan Drewery
caf1fb322e Let CLEANDEPENDFILES actually be set before bsd.dep.mk.
This fixes 'cleandepend' for kmods after r295983.

Pointyhat to:	bdrewery
Sponsored by:	EMC / Isilon Storage Division
2016-02-26 01:52:33 +00:00
David C Somayajulu
4ef8ebfd62 Upgrade the firmware carried in driver and loaded during hardware
initialization (a.k.a STORM firmware) to version 7.13.1 (latest version)
2016-02-25 22:44:00 +00:00
Andrew Turner
6daa2c8751 Fix a mistake that crept in when moving between git and svn, pic_ipi_send
should not be called from platform_mp_init_secondary.

Sponsored by:	ABT Systems Ltd
2016-02-25 22:13:43 +00:00
Bryan Drewery
73465ff7c7 Remove realall references from initial NetBSD import in r219019.
We've never had a realall.

Sponsored by:	EMC / Isilon Storage Division
2016-02-25 21:05:04 +00:00
Bryan Drewery
57b5a84431 Slightly lessen the amount of job target output for SUBDIR_PARALLEL.
Sponsored by:	EMC / Isilon Storage Division
2016-02-25 21:04:52 +00:00
Andrew Turner
243b36c321 Remove platform_ipi_send, it's an unneeded as all implementations are
identical.

Sponsored by:	 ABT Systems Ltd
2016-02-25 20:48:23 +00:00
Jared McNeill
dd03610a2e Add Allwinner A20 HDMI support.
The HDMI driver will attach a framebuffer device when a display is
connected. If the EDID can be read and contains a preferred mode, it
will be used. Otherwise the framebuffer will default to 800x600.

In addition, if the EDID contains a CEA-861 extension block and the
"basic audio" flag is set, audio playback at 48kHz 16-bit stereo is
enabled on the controller.

Reviewed by:		andrew
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5383
2016-02-25 20:17:18 +00:00
Mark Johnston
4de485fe5f Lock the NDP default router list and count defrouter references.
This addresses a number of race conditions that can cause crashes as a
result of unsynchronized access to the list.

PR:		206904
Tested by:	Larry Rosenman <ler@lerctr.org>,
		Kevin Bowling <kevin.bowling@kev009.com>
MFC after:	2 months
Differential Revision: https://reviews.freebsd.org/D5315
2016-02-25 20:12:05 +00:00
Bryan Drewery
a2835556e9 Fix build without FAST_DEPEND and without running 'make depend' after r295985.
The OBJS_DEPEND_GUESS mechanism required moving the bsd.dep.mk inclusion
to after the checks, but left DEPENDFILE not-yet-set.  Move it to
bsd.own.mk to resolve this.

Pointyhat to:	bdrewery
Reported by:	antoine (ports failures)
Sponsored by:	EMC / Isilon Storage Division
2016-02-25 20:02:42 +00:00
Mark Johnston
0acf5d0bfd Improve error handling for posix_fallocate(2) and posix_fadvise(2).
- Set td_errno so that ktrace and dtrace can obtain the syscall error
  number in the usual way.
- Pass negative error numbers directly to the syscall layer, as they're
  not intended to be returned to userland.

Reviewed by:	kib
Sponsored by:	EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5425
2016-02-25 19:58:23 +00:00
Stanislav Galabov
d173587f9a Add myself as src committer
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5438

M    committers-src.dot
2016-02-25 19:29:55 +00:00
Ed Maste
621a9c54dd pass -fPIC to the assembler, not linker
-fPIC has no effect on linking although it seems to be ignored by
GNU ld.bfd.  However, it causes ld.lld to terminate with an invalid
argument error.

Reviewed by:	dchagin, kib
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5444
2016-02-25 19:26:14 +00:00
Pedro F. Giffuni
7880fc113f talk(1): Replace select(2) with poll(2)
Hinted by:	OpenBSD and NetBSD
2016-02-25 19:06:44 +00:00
Mariusz Zaborski
c501d73c7e Convert casperd(8) daemon to the libcasper.
After calling the cap_init(3) function Casper will fork from it's original
process, using pdfork(2). Forking from a process has a lot of advantages:
1. We have the same cwd as the original process.
2. The same uid, gid and groups.
3. The same MAC labels.
4. The same descriptor table.
5. The same routing table.
6. The same umask.
7. The same cpuset(1).
From now services are also in form of libraries.
We also removed libcapsicum at all and converts existing program using Casper
to new architecture.

Discussed with:		pjd, jonathan, ed, drysdale@google.com, emaste
Partially reviewed by:	drysdale@google.com, bdrewery
Approved by:		pjd (mentor)
Differential Revision:	https://reviews.freebsd.org/D4277
2016-02-25 18:23:40 +00:00
John Baldwin
6fb8946b7f Add simple support for CloudABI processes to kdump(1).
This does not decode arguments to system calls but should properly
decode system call names and error return values.

Reviewed by:	ed
Differential Revision:	https://reviews.freebsd.org/D5412
2016-02-25 17:43:32 +00:00
Andrew Turner
7ea3f5b654 Add support for the Allwinner A31 watchdog to the existing A10 watchdog
driver. This mostly involves selecting the register offsets to use at
runtime based on the hardware we are talking to.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D5327
2016-02-25 16:50:36 +00:00
Zbigniew Bodek
af8fe8f169 Introduce HW TSO support for VNIC
This feature was added in Pass2.0.
Significantly improves VNIC's TCP performance on Tx.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5424
2016-02-25 14:29:57 +00:00
Zbigniew Bodek
3bdcfead19 Enable CQ count threshold interrupt on VNIC Pass2.0
On Pass2.0 can trigger interrupt on both timer and CQ count.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5423
2016-02-25 14:28:10 +00:00
Zbigniew Bodek
3ad422a9d3 Fix VNIC support for Pass2.0 ThunderX chips
- Check chip revision using pass1_silicon() routine.
- Configure CPI correctly for Pass2.0

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5422
2016-02-25 14:26:13 +00:00
Zbigniew Bodek
73f8bb5343 Remove soft reset from the VNIC's PF driver
This is not needed and causes revid register of the PCI
configuration space to clear on Pass2.0.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5421
2016-02-25 14:24:32 +00:00
Zbigniew Bodek
332c869727 Improve VNIC performance on Tx path by immediate packet transmission
Don't postpone Tx if the Tx lock can be acquired now.
This gives 3x better performance on egress.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5325
2016-02-25 14:23:02 +00:00
Zbigniew Bodek
6dc234599f Clean-up network interface settings for VNIC
- Remove unrelevant bits
- Remove redundant code
- Reset variables and then set given bits

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5324
2016-02-25 14:21:04 +00:00
Zbigniew Bodek
44f2eb96bd Enable HWSTATS capability for VNIC
VNIC manages counters in hardware hence it is desired to have this
option enabled to avoid redundant stats update in ether_input_internal().

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5323
2016-02-25 14:19:02 +00:00
Zbigniew Bodek
44dd269352 Prefetch next CQ descriptor in Completion Queue handling loop of VNIC
Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5322
2016-02-25 14:17:13 +00:00
Zbigniew Bodek
053f3d0e7e Enable LRO support for VNIC driver
Support for software LRO when enabled in the capabilities

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5321
2016-02-25 14:14:46 +00:00
Zbigniew Bodek
856dce91c0 Add support for hardware Tx and Rx checksums to VNIC driver
- The network controller verifies Rx TCP/UDP/SCTP checksums by default.
  Communicate this to the stack when the packet is not marked as erroneous
  to avoid redundant checksum calculation in kernel.
- It is not uncommon to get the mbuf with m_len that is less than
  the minimal size for the IP, TCP, UDP, etc. when HW checsumming
  is enabled. To avoid data corruption performed by the HW that is
  intended to write IP and TCP/UDP/SCTP checksums to the data segment,
  the mbuf needs to be pulled up by the required number of bytes.
- Make sure that one can modify the mbufs that require checsum calculation
  rather than check for NULL mbuf on each transmission.

Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5320
2016-02-25 14:12:51 +00:00
Andrew Turner
ccf8caad14 Add the Allwinner A31 and A31s padconf support. It's currently unused, but
will be needed when we bring in further support for these SoCs.

Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision:	https://reviews.freebsd.org/D5340
2016-02-25 12:17:41 +00:00
Sepherosa Ziehau
f7d33dfef2 hyperv: Wait 5 seconds for hyperv result, instead of 500ms
This addresses various devices (network, stoarge) attach failure.

Reported by:	Hongxiong Xian <v-hoxian microsoft com>
Tested by:	Hongxiong Xian <v-hoxian microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5435
2016-02-25 09:27:50 +00:00
Kristof Provost
14b5e85b18 pf: Fix possible out-of-bounds write
In the DIOCRSETADDRS ioctl() handler we allocate a table for struct pfr_addrs,
which is processed in pfr_set_addrs(). At the users request we also provide
feedback on the deleted addresses, by storing them after the new list
('bcopy(&ad, addr + size + i, sizeof(ad));' in pfr_set_addrs()).

This means we write outside the bounds of the buffer we've just allocated.
We need to look at pfrio_size2 instead (i.e. the size the user reserved for our
feedback). That'd allow a malicious user to specify a smaller pfrio_size2 than
pfrio_size though, in which case we'd still read outside of the allocated
buffer. Instead we allocate the largest of the two values.

Reported By:	Paul J Murphy <paul@inetstat.net>
PR:		207463
MFC after:	5 days
Differential Revision:	https://reviews.freebsd.org/D5426
2016-02-25 07:33:59 +00:00
Sepherosa Ziehau
fd458696b3 hyperv/hn: Hold the TX ring lock then drain TX desc buf_ring
Reported by:	Hongxiong Xian <v-hoxian microsoft com>
MFC after:	1 week
Sponsored by:	Microsoft OSTC
2016-02-25 07:03:10 +00:00
Justin Hibbits
a4965cf07b Fix the build.
Pointy-hat to:	jhibbits
Spotted by:	bde
2016-02-25 04:32:17 +00:00
Sepherosa Ziehau
ea134429d0 hyperv/hn: Implement ifnet.if_transmit method
It will be turned on by default later.

MFC after:	1 week
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D5415
2016-02-25 03:21:25 +00:00
Steven Hartland
e283644b87 Removed unused label and fix mutex_exit order
Remove unused done label from zfs_setacl fixing PVS-Studio V729.

Fix mutex_exit order to mirror the mutex_enter order.

MFC after:	1 week
Sponsored by:	Multiplay
2016-02-25 03:01:24 +00:00
Steven Hartland
5bae00d6b4 Fix NULL pointer dereferences
Fix NULL pointer dereferences identified as V522 by PVS-Studio.

MFC after:	1 week
Sponsored by:	Multiplay
2016-02-25 02:46:47 +00:00
Jared McNeill
6da9071523 Fix dedicated DMA transfers.
For sources and destinations marked "noincr", the previous code was
incorrectly programming the dedicated DMA channel control register
using bit definitions for normal DMA channels. This code path is not
currently used, but will be used by the HDMI audio driver in review.

Reviewed by:		andrew
Approved by:		gonzo (mentor)
Differential Revision:	https://reviews.freebsd.org/D5382
2016-02-25 01:24:02 +00:00
Navdeep Parhar
e8c6ba7265 cxgbe(4): Add a sysctl to retrieve the maximum speed/bandwidth supported by a
port.

dev.cxgbe.<n>.max_speed
dev.cxl.<n>.max_speed

Sponsored by:	Chelsio Communications
2016-02-25 01:10:56 +00:00
Jared McNeill
fa104e4174 Add myself as src committer.
Approved by:	gonzo (mentor)
2016-02-25 01:03:34 +00:00
Bryan Drewery
89660f21db Add order for installworld/installkernel.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 22:27:25 +00:00
Bryan Drewery
b9c6f31681 Add more STANDALONE_SUBDIR_TARGETS.
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 22:27:22 +00:00
Bryan Drewery
90a2d98448 OBJS and POBJS have not been used since r215127.
r215127 disabled building of libgcc.a.

MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 22:27:18 +00:00
Konstantin Belousov
70209aca16 In bpf_getdltlist(), do not call copyout(9) while holding bpf lock.
Copy the data into temprorary malloced buffer and drop the lock for
copyout.

Reported, reviewed and tested by:	cem
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-02-24 22:00:35 +00:00
Bryan Drewery
6607cb5de8 Don't hide AR command as bsd.lib.mk's r283925 changed as well.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 21:19:44 +00:00
Konstantin Belousov
c83559c31f Fix year.
Noted by:	bdrewery
MFC after:	2 weeks
2016-02-24 20:32:24 +00:00
Bryan Drewery
1fdc8e0e39 PROGS: Only the main process will install INCS.
MFC after:	2 weeks
Sponsored by:	EMC / Isilon Storage Division
2016-02-24 20:28:48 +00:00