Commit Graph

228676 Commits

Author SHA1 Message Date
Marius Strobl
54ef33c2a8 Probe Intel Denverton eMMC 5.0 controllers. 2017-12-28 22:03:08 +00:00
Marius Strobl
15f0034553 With the advent of interrupt remapping, Intel has repurposed bit 11
(now: Interrupt_Index[15]) and assigned the previously reserved bits
55:48 (Interrupt_Index[14:0] goes into 63:49 while Destination Field
used 63:56 and bit 48 now is Interrupt_Format) in the IO redirection
tables (see the VT-d specification, "5.1.5.1 I/OxAPIC Programming").
Thus, when not using interrupt remapping, ensure that all previously
reserved bits in the high part of the RTEs are zero instead of doing
a read-modify-write for their Destination Field bits only.
Otherwise, on machines based on Apollo Lake and its derivatives such
as Denverton, typically some of the previously preserved bits remain
set after boot when not employing interrupt remapping. The result is
that INTx interrupts are not getting delivered.
Note: With an AMD IOMMU, interrupt remapping apparently bypasses the
IO APIC altogether.

Submitted by:	loos (modulo comment)
Reviewed by:	jhb (modulo comment)
2017-12-28 21:46:09 +00:00
John Baldwin
9a1bf495b1 Remove a few more dangling references to ie(4). 2017-12-28 21:35:53 +00:00
Sean Bruno
6fe4c0a063 e1000: Add support for Ice Lake and Cannon Lake
Ths add initial support for Ice Lake and Cannon Lake ethernet devices.

This also addressed errata 1.5.4.4 for Sky Lake and Kabby Lake devices:
https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/i218-i219-ethernet-connection-spec-update.pdf?asset=9561

Submitted by:	Kevin Bowling <kevin.bowling@kev009.com>
Relnotes:	Yes
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D13660
2017-12-28 21:26:40 +00:00
Kyle Evans
5c0700f692 stand/fdt: Avoid bailout when dtbo has no fixups
In the case of a simple dtbo where fragment uses target-path and the overlay
contains no references, /__fixups__ will not be included by either our dtc
or dtc from ports, but the file still has valid fragments to be applied.

Additional testing found that /__symbols__ might also be omitted if it's
empty, which is not necessarily an error.

Reviewed by:	gonzo, imp
Differential Revision:	https://reviews.freebsd.org/D13663
2017-12-28 21:12:27 +00:00
Kyle Evans
a609d03b04 stand/fdt: Fix loading of multiple fdt_overlays
fdt_load_dtb_overlays was written to unload previous overlay when a new
valid one is come across. fdt_apply_overlays further down is written to
iterate over all .dtbo's currently loaded and apply them one-by-one. Correct
fdt_load_dtb_overlays to stop dropping valid overlays that were previously
loaded and match expectations.

Reviewed by:	gonzo, imp
Differential Revision:	https://reviews.freebsd.org/D13659
2017-12-28 21:09:36 +00:00
Pedro F. Giffuni
3760a9ac78 Fix some typos.
Obtained from:	OpenBSD (CVS v1.5)
2017-12-28 20:40:56 +00:00
Pedro F. Giffuni
a8e6714356 netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.
This bring back r327293 from OpenBSD, with the important difference that
we are now getting it from their ip6_id.c file.

Obtained from:	OpenBSD (CVS v1.3)
2017-12-28 20:35:21 +00:00
Pedro F. Giffuni
b3c64c30fa Start syncing changes from OpenBSD's ip6_id.c instead of ip_id.c.
correct non-repetitive ID code, based on comments from niels provos.
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x".
- skipping number is not needed, so disable it for 16bit generator (makes
  the repetition period to 30000)

Obtained from:	OpenBSD (CVS rev. 1.2)
MFC after:	1 week
2017-12-28 20:26:51 +00:00
Pedro F. Giffuni
d82751000f Revert r327293
netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.

I was looking at the wrong file. There is an important merge that must be
done before I can bring this change.
2017-12-28 20:10:10 +00:00
Pedro F. Giffuni
e9738d25c1 netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.
This file is supposed to be based on the OpenBSD CVS v1.6 but checking
the OpenBSD repository the license had already dropped the 2&3 clasues by
then. Catch up with the licensing.

Obtained from:	OpenBSD (CVS 1.2)
2017-12-28 19:42:53 +00:00
John Baldwin
a4f66e5f21 Minor formatting and style tweaks to some comments. 2017-12-28 18:51:35 +00:00
John Baldwin
c2ab6ce5e2 Remove a stale reference to ie(4).
This was missed in r304513.

Submitted by:	kib
2017-12-28 17:55:58 +00:00
Pedro F. Giffuni
5ab6bac110 rpc.sprayd: Remove 3rd and 4th clauses in christos' license.
Obtained from:	NetBSD
2017-12-28 17:51:53 +00:00
Pedro F. Giffuni
bec1dbb67b rpc.sprayd: Bring some changes from NetBSD.
Most notable, other than some style issues:
CVS 1.11:
  do not use LOG_CONS.
CVS 1.13:
  consistently use exit instead of return in main().
  use LOG_WARNING instead of LOG_ERR for non critical errors.

Obtained from:	NetBSD
MFC after:	2 weeks
2017-12-28 17:44:30 +00:00
Pedro F. Giffuni
d7629e6644 sys/sys/chio.h: add NetBSD RCS ID.
Make it easier to identify the point where we started diverging from
NetBSD. Newer versions of this file has been updated to a new license so
this information may become useful some day.

Obtained from:	NetBSD
2017-12-28 14:26:33 +00:00
Pedro F. Giffuni
aa0e6abb41 sys/i386/isa/elink*: sync with (older) NetBSD.
Make it easier to identify the point where we started diverging from
NetBSD. Newer versions of these files have been updated to a new license
so this information may become useful some day.

Obtained from:	NetBSD
2017-12-28 14:14:35 +00:00
Konstantin Belousov
cfb03f67d9 Reuse kern_proc_vmmap_resident() for procfs_map resident count.
The existing algorithm in procfs_map() to calculate count of resident
pages in an entry is too primitive, resulting in too long run time for
large sparse mapping entries.  Re-use the kern_proc_vmmap_resident()
from kern_proc.c which only looks at the existing pages in the
iterations.

Also, this makes procfs to honor kern.proc_vmmap_skip_resident_count,
if user does not need this information.

Reported by:	Glenn Weinberg <glenn.weinberg@intel.com>
PR:	224532
No objections from:	des (procfs maintainer)
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13595
2017-12-28 13:23:13 +00:00
Konstantin Belousov
baaa79699a Make kern_proc_vmmap_resident() externally accesible, and move the
vmmap_skip_res_cnt control check inside it.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D13595
2017-12-28 13:16:32 +00:00
Konstantin Belousov
7028c31d21 Style. Remove useless return.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-12-28 13:01:27 +00:00
Konstantin Belousov
298321a2e9 Complete r327264 by fixing yet another return without cleanup.
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2017-12-28 12:59:48 +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
Emmanuel Vadot
ee070097f2 Revert r327250 as it broke the build for some armv6 kernel and all armv4/5
Reported by:	ian
2017-12-28 07:31:14 +00:00
Warner Losh
d8dfc65f43 Close fd when we're done dv-sending the file.
CID: 978413
2017-12-28 05:34:38 +00:00
Warner Losh
e495018e91 Free mp on a couple of error paths.
CID: 978387
2017-12-28 05:34:34 +00:00
Warner Losh
e8d2bea9cb Close the fp rather than the fd since we fdopen the fd so we don't
leak the FILE *.

CID: 978383
2017-12-28 05:34:29 +00:00
Warner Losh
5539da566e When bind fails, make sure we closed the socket we tried to bind the
address to.

CID: 978244
2017-12-28 05:34:24 +00:00
Warner Losh
cd4461513c Close fd and fd1 before returning now that we're done with them.
CID: 978234, 978236
2017-12-28 05:34:19 +00:00
Warner Losh
80c3f90ed4 Don't leak outfile. Free it before we return from bincvt.
CID: 273685
2017-12-28 05:34:14 +00:00
Warner Losh
0bebba31d3 Plug memory leak by freeing wantedblk{32,64}.
CID: 273655, 273656
2017-12-28 05:34:08 +00:00
Warner Losh
7790c87b71 Free zbuf when kflag is true too.
CID: 273376
2017-12-28 05:34:04 +00:00
Warner Losh
7e8fba7889 Close slave on fork error to prevent pty fd leak.
CID: 978209
2017-12-28 05:33:59 +00:00
Warner Losh
076950009f Free path before returnig.
CID: 977827
2017-12-28 05:33:54 +00:00
Warner Losh
df017019c2 Close cpfrom in an error case.
CID: 271771
2017-12-28 05:33:49 +00:00
Warner Losh
290ce7d2a9 Free data after we're done with it.
CID: 271595, 275337, 1368743
2017-12-28 05:33:44 +00:00
Warner Losh
7e7e1b062b Free inb on error return.
CID: 270099
2017-12-28 05:33:39 +00:00
Warner Losh
074170fb81 Free some variables before they go out of scope.
CID: 92074, 270099
2017-12-28 05:33:34 +00:00
Warner Losh
e893031d91 Plug two resource leaks.
CID: 92077, 92074
2017-12-28 05:33:29 +00:00
Warner Losh
d79dc9b482 Use proper failure path rather than just returning.
CID: 1199354, 1006894, 1006893, 1006892
2017-12-28 05:33:24 +00:00
Warner Losh
1987e300d0 Explicitly ignore return value from remove. We wouldn't do anything
differently if we can't unlink the temporary file. Also, free the
temporary file name when we set it to NULL.

CID: 1006909, 719448
2017-12-28 05:33:19 +00:00
Warner Losh
829ec26617 Don't leak resources on duplicate -m or -M arguments. Last one wins.
CID: 1204385, 1204384
2017-12-28 05:32:59 +00:00
Pedro F. Giffuni
8a97717048 SPDX: fix wrong license ID tag in dev/cesa. 2017-12-28 03:10:57 +00:00
Pedro F. Giffuni
bd9ba70127 SPDX: fix wrong license ID tag in dev/spibus. 2017-12-28 03:04:36 +00:00
Eitan Adler
837fe32558 Fix a few more speelling errors
Reviewed by:		bjk
Reviewed by:		jilles (incl formal "accept")
Differential Revision:	https://reviews.freebsd.org/D13650
2017-12-28 01:31:28 +00:00
Nathan Whitehorn
6134b18696 Fix bug introduced in r326674, in which efi boot partitions created by
the installer but not mounted (i.e. with boot1.efifat dd'ed to them
rather than the forthcoming proper filesystem) would get newfs_msdos run
on them immediately after the boot code was copied. This would overwrite
the bootstrap code, causing the EFI system partition to be blanked and
resulting in an unbootable system.

PR:		224562
2017-12-28 01:21:30 +00:00
Pedro F. Giffuni
2cc7a55540 SPDX: fix wrong license ID tag in libkern. 2017-12-28 01:20:30 +00:00
Pedro F. Giffuni
ebd63680e4 arm/ixp425: Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
This syncs us with NetBSD as much of our changes have been upstreamed.

Obtained from:	NetBSD
2017-12-28 01:12:28 +00:00
Pedro F. Giffuni
8f1927357d SPDX: fix license ID tags for arm/xscale.
Use parenthesis for grouping as suggested by the spec.
2017-12-27 22:47:56 +00:00
Navdeep Parhar
adbb3637ec cxgbe/iw_cxgbe: Fix iWARP over VLANs (catch up with r326169).
Submitted by:	KrishnamRaju ErapaRaju @ Chelsio
Sponsored by:	Chelsio Communications
2017-12-27 22:44:50 +00:00