Commit Graph

19139 Commits

Author SHA1 Message Date
Roger Pau Monné
8f62926e03 vt: add option to ignore NO_VGA flag in ACPI
To workaround buggy firmware that sets this flag when there's actually
a VGA present.

Reported and tested by:	Yasuhiro KIMURA <yasu@utahime.org>
Sponsored by:		Citrix Systems R&D
Reviewed by:		kib
Differential revision:	https://reviews.freebsd.org/D16003
2018-06-25 09:39:16 +00:00
Ed Schouten
7739f6e5ad Fix spelling of "reclamation". 2018-06-25 06:57:10 +00:00
Konstantin Belousov
503b10da57 bhyve/vmrun.sh: make -L functional.
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2018-06-24 15:22:38 +00:00
Oleksandr Tymoshenko
80cb7cd44c Document multi variants of *prop_alloc functions
Add documentation and symlinks for OF_getprop_alloc_multi
and OF_getencprop_alloc_multi functions.

Also while here fix copy-pasted .Dt value and add one more
failure condition for OF_getencprop_alloc.
2018-06-23 20:05:07 +00:00
Oleksandr Tymoshenko
65769339cb Bump .Dd value after r335585 2018-06-23 19:30:29 +00:00
Oleksandr Tymoshenko
96308c2a28 Fix invalid OF_getencprop_alloc usage in fdt_pinctrl(9)
r332341 introduced OF_getencprop_alloc_multi that should be used
instead of OF_getencprop_alloc to get multi-cell properties.
Fix example to reflect this change.
2018-06-23 19:01:05 +00:00
Kristof Provost
150182e309 pf: Support "return" statements in passing rules when they fail.
Normally pf rules are expected to do one of two things: pass the traffic or
block it. Blocking can be silent - "drop", or loud - "return", "return-rst",
"return-icmp". Yet there is a 3rd category of traffic passing through pf:
Packets matching a "pass" rule but when applying the rule fails. This happens
when redirection table is empty or when src node or state creation fails. Such
rules always fail silently without notifying the sender.

Allow users to configure this behaviour too, so that pf returns an error packet
in these cases.

PR:		226850
Submitted by:	Kajetan Staszkiewicz <vegeta tuxpowered.net>
MFC after:	1 week
Sponsored by:	InnoGames GmbH
2018-06-22 21:59:30 +00:00
Dimitry Andric
cbafd2630b Add support for selectively enabling LLVM targets
This makes it possible, through src.conf(5) settings, to select which
LLVM targets you want to build during buildworld.  The current list is:

* (WITH|WITHOUT)_LLVM_TARGET_AARCH64
* (WITH|WITHOUT)_LLVM_TARGET_ARM
* (WITH|WITHOUT)_LLVM_TARGET_MIPS
* (WITH|WITHOUT)_LLVM_TARGET_POWERPC
* (WITH|WITHOUT)_LLVM_TARGET_SPARC
* (WITH|WITHOUT)_LLVM_TARGET_X86

To not influence anything right now, all of these are on by default, in
situations where clang is enabled.

Selectively turning a few targets off manually should work.  Turning on
only one target should work too, even if that target does not correspond
to the build architecture.  (In that case, LLVM_NATIVE_ARCH will not be
defined, and you can only use the resulting clang executable for
cross-compiling.)

I performed a few measurements on one of the FreeBSD.org reference
machines, building clang from scratch, with all targets enabled, and
with only the x86 target enabled.  The latter was ~12% faster in real
time (on a 32-core box), and ~14% faster in user time.  For a full
buildworld the difference will probably be less pronounced, though.

Reviewed by:	bdrewery
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D11077
2018-06-22 15:00:00 +00:00
Eitan Adler
66deb95625 epoch.9: bump Dd
ref D15961
2018-06-22 06:05:19 +00:00
Eitan Adler
7d9389b096 epoch.9: fix some style and speeling issues
Reported by:	Yutaro Hayakawa <yhayakawa3720@gmail.com> (spelling)
Differential Revision: https://reviews.freebsd.org/D15961
2018-06-22 06:04:22 +00:00
Bryan Drewery
a7ce3d543b ino64 uses 8 byte padding now. 2018-06-21 16:39:38 +00:00
Edward Tomasz Napierala
b920f69bd0 "Kernel APIs" is a misnomer; use the proper name instead.
Suggested by:	kib@, ian@
MFC after:	2 weeks
2018-06-21 08:19:11 +00:00
Edward Tomasz Napierala
4c156ba299 Improve wording.
MFC after:	2 weeks
2018-06-20 19:16:51 +00:00
Bryan Drewery
6e6be2bbe2 Reduce exec and fstat overhead for non-build targets.
This is mostly targetting 'make showconfig' and 'make test-system-*' for
the benefit of makeman and universe-one-clang work.

Sponsored by:	Dell EMC
2018-06-20 17:20:39 +00:00
Bryan Drewery
be9309decd Regenerate for SYSTEM_LINKER 2018-06-20 16:15:03 +00:00
Bryan Drewery
a7d84af890 Add WITH_SYSTEM_LINKER, on by default, that avoids building lld when possible.
This works similar to WITH_SYSTEM_COMPILER added in r300354.  It only
supports lld via WITH_LLD_BOOTSTRAP.

When both SYSTEM_COMPILER and SYSTEM_LINKER logic passes then libclang
will not build in cross-tools.  If either check fails though then
libclang is built.

The .info is reworked to notify when libclang will be built since if
either clang or lld needs to be rebuilt, but not the other, the
notification can lead to confusion on why "clang is building".

-fuse-ld= is not used with this method so some combinations of compiler
and linker are expected to fail.

A new 'make test-system-linker' target is added to see the logic results.

Makefile.inc1:
  CROSS_BINUTILS_PREFIX support had to be moved higher up so that XLD
  could be set and MK_LLD_BOOTSTRAP disabled before checking SYSTEM_LINKER
  logic as done with SYSTEM_COMPILER.  This also required moving where
  bsd.linker.mk was read since XLD needs to be set before parsing it.  This
  creates a situation where src.opts.mk can not test LINKER_FEATURES or
  add LLD_BOOTSTAP to BROKEN_OPTIONS.

Reviewed by:	emaste (earlier version)
Sponsored by:	Dell EMC
Differential Revision:	https://reviews.freebsd.org/D15894
2018-06-20 16:10:14 +00:00
Bjoern A. Zeeb
7ffbcfe281 Sometimes it is helpful to get the path for a vnode.
Implement a ddb function walking the namecache to do this.

Reviewed by:		jhb, mjg
Inspired by:		gdb macro from jhb (old version)
Sponsored by:		iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D14898
2018-06-20 08:34:29 +00:00
Sean Bruno
01cebb69be MK_EFI - Add uefisign and friends to this knob and ensure that we don't
try to build them if MK_OPENSSL is unset.

Reviewed by:	emaste imp kevans
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D15211
2018-06-19 21:07:25 +00:00
Mark Felder
6b82569f2d Document the new ${name}_env_file feature
Approved by:	bcr
MFH:		3 days
Differential Revision:	https://reviews.freebsd.org/D15578
2018-06-19 19:27:37 +00:00
Ruslan Bukin
2f7f197723 Don't use TARGET_ARCH in this file, use MACHINE_ARCH instead.
TARGET_ARCH is not defined when building ports/packages.

Sponsored by:	DARPA, AFRL
2018-06-19 13:28:02 +00:00
Kurt Jaeger
bc2d1fb2fb share/misc/organization.dot: updates
- add krion, philip to postmaster@
- remove trhodes from donations@, email bounces

Approved by:	remko
2018-06-19 12:16:19 +00:00
Mariusz Zaborski
1093ff61cd libnv: add note about nvlist_pack and nvlist_unpack
Fix small typo as well.

Submitted by:	Mindaugas Rasiukevicius <rmind@netbsd.org>
2018-06-18 23:00:15 +00:00
Mariusz Zaborski
24881c060c libnv: Add nvlist_append_*_array() family of functions.
The nvlist_append_{bool,number,string,nvlist,descriptor}_array() functions
allows to dynamically extend array stored in the nvlist.

Submitted by:	Mindaugas Rasiukevicius <rmind@netbsd.org>
2018-06-18 22:57:32 +00:00
Mariusz Zaborski
d82e41b6b8 libnv: Remove nvlist argument from cnvlist_{take,free}_* functions.
All information which are need for those operations is already stored in
the cookie.

We decided not to bump libnv version because this API is not used yet in the
base system.

Reviewed by:	pjd
2018-06-18 21:26:58 +00:00
Mariusz Zaborski
30665f3c42 libnv: add const to cookies arguments
Pointed out by:	pjd@
2018-06-18 21:23:40 +00:00
Mariusz Zaborski
0db44d5550 libnv: change name of cookie from cookiep to cookie.
The name was inconsistent with rest of the library.
No functional change intended.

Pointed out by:	pjd@
2018-06-18 21:18:20 +00:00
Edward Tomasz Napierala
8a1500e525 Improve spelling and capitalize "Kerberos".
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-06-18 13:49:44 +00:00
Konstantin Belousov
f39bffc62c Rework ofed build.
Aligns the build with the FreeBSD traditional approach to not build in
contrib/, and to track inter-dependencies between libraries.

With help from:	bdrewery
Reviewed by:	bdrewery, hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15648
2018-06-16 15:05:05 +00:00
Ed Maste
e2d98a24b4 src.conf.5: regen after r335210, *BINUTILS description updates
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:25:36 +00:00
Ed Maste
c647e51f6a elf.5: add readelf cross-reference
objdump is sometimes used in cases where readelf is more appropriate,
but the obsolete GNU objdump we have in the base system will be removed
in the future.

.Xr readelf from elf.5 to improve the odds the more appropriate tool
will be found.

PR:		229046
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2018-06-15 16:14:42 +00:00
Emmanuel Vadot
19668eb2bf rk_i2c: Add manpage for this driver 2018-06-14 07:59:47 +00:00
Warner Losh
f0f8a1af01 NVME support is only for x86 and powerpc64.
Implement MK_NVME now that the expression for where NVMe is
complicated. Default it to "yes" for x86 and powerpc64 and
no everywhere else. Use it in camcontrol to define WITH_NVME
for those platforms where we support nvme.

This should fix the newly introduced nvme files to camcontrol
which were building everywhere.

Pointy Hat To: imp
Sponsored by: Netflix
2018-06-14 01:15:19 +00:00
Edward Tomasz Napierala
86b83608d8 Mention that ports are used to build packages, this fact - obvious
to the developers, but much less so to users - seems to be rather
weakly documented.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2018-06-13 18:50:51 +00:00
Edward Tomasz Napierala
8f9c737173 Get rid of references to /usr/share/doc/ from ports(7) and getosreldate(3).
The handbooks are not installed there anymore. While here, improve the
URLs markup a bit.

Reviewed by:	allanjude@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D15793
2018-06-13 18:34:49 +00:00
Jonathan T. Looney
0766f278d8 Make UMA and malloc(9) return non-executable memory in most cases.
Most kernel memory that is allocated after boot does not need to be
executable.  There are a few exceptions.  For example, kernel modules
do need executable memory, but they don't use UMA or malloc(9).  The
BPF JIT compiler also needs executable memory and did use malloc(9)
until r317072.

(Note that a side effect of r316767 was that the "small allocation"
path in UMA on amd64 already returned non-executable memory.  This
meant that some calls to malloc(9) or the UMA zone(9) allocator could
return executable memory, while others could return non-executable
memory.  This change makes the behavior consistent.)

This change makes malloc(9) return non-executable memory unless the new
M_EXEC flag is specified.  After this change, the UMA zone(9) allocator
will always return non-executable memory, and a KASSERT will catch
attempts to use the M_EXEC flag to allocate executable memory using
uma_zalloc() or its variants.

Allocations that do need executable memory have various choices.  They
may use the M_EXEC flag to malloc(9), or they may use a different VM
interfact to obtain executable pages.

Now that malloc(9) again allows executable allocations, this change also
reverts most of r317072.

PR:		228927
Reviewed by:	alc, kib, markj, jhb (previous version)
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D15691
2018-06-13 17:04:41 +00:00
Kurt Jaeger
1833cea27e Add hrs, meta and myself to share/misc/committers-ports.dot
Approved by:	remko
2018-06-12 07:51:03 +00:00
Ed Maste
1463aa7444 muge.4: remove BUGS section (about link/act LEDs)
Lack of functioning link and activity LEDs on devices without an EEPROM
is expected (not a bug).  Quoting the EVB-LAN7850 User's Guide:

    When configured with the default internal register settings, the
    Ethernet Link status LEDs are not enabled.  To enable Ethernet Link
    status LEDs, enable the EEPROM.

This is an artifact of the different ways in which the evaluation board
can be used.  End-user USB-Ethernet adapters using the Microchip LAN78XX
or LAN7515 controllers should use an EEPROM or have OTP configuration,
if their product configuration does not match the boot default register
configuration.

Sponsored by:	The FreeBSD Foundation
2018-06-11 20:46:20 +00:00
Ed Maste
8706f88dfa Connect muge.4 man page
Sponsored by:	The FreeBSD Foundation
2018-06-11 20:19:20 +00:00
Ed Maste
66ce002de7 muge.4: correct BUGS statement
The EVB-LAN7850 I have does function with the EEPROM disabled - the
link / activity LEDs just do not function.

Sponsored by:	The FreeBSD Foundation
2018-06-11 19:48:15 +00:00
Ed Maste
2d14fb8bec if_muge: add LAN7850 support
Differences between LAN7800 and LAN7850 from the driver's perspective:

* The LAN7800 muxes EEPROM signals with LEDs, so LED mode needs to be
  disabled when reading/writing EEPROM.  The EEPROM is not muxed on the
  LAN7850.

* The Linux driver enables automatic duplex and speed detection when
  there is no EEPROM, for the LAN7800 only.  With this FreeBSD driver
  LAN7850-based adapters without a configuration EEPROM fail to link
  (with or without the automatic duplex and speed detection code), so
  I have just followed the example of the Linux driver for now.

Sponsored by:	The FreeBSD Foundation
Sponsored by:	Microchip (hardware)
2018-06-11 18:44:56 +00:00
Vladimir Kondratyev
67580198b7 Drop MOUSE_GETVARS and MOUSE_SETVARS ioctls support.
These ioctls are not documented and only stubbed in a few drivers: mse(4),
psm(4) and syscon's sysmouse(4). The only exception is MOUSE_GETVARS
implemented in psm(4)

Given the fact that they were introduced 20 years ago and implementation
has never been completed, remove any related code.

PR:		228718 (exp-run)
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D15726
2018-06-10 10:23:31 +00:00
Michael Dexter
4fbf84f1cb Add myself with mentor. Corrected path svnadmin/conf/access in comments.
Approved by:	bcr (mentor)
2018-06-10 05:37:40 +00:00
Jonathan T. Looney
1f725683af Create a symlink for sodtor_set(9) to the socket(9) man page. 2018-06-08 19:47:04 +00:00
Jonathan T. Looney
1fbe13cf4b Add a socket destructor callback. This allows kernel providers to set
callbacks to perform additional cleanup actions at the time a socket is
closed.

Michio Honda presented a use for this at BSDCan 2018.
(See https://www.bsdcan.org/2018/schedule/events/965.en.html .)

Submitted by:	Michio Honda <micchie at sfc.wide.ad.jp> (previous version)
Reviewed by:	lstewart (previous version)
Differential Revision:	https://reviews.freebsd.org/D15706
2018-06-08 19:35:24 +00:00
Mark Johnston
550c8fa123 Correct the list of supported drivers.
- bnxt(4) is supported via iflib.
- mlx4en(4) support has not yet been committed.
2018-06-08 17:55:06 +00:00
Brad Davis
dd0878dd7f Simplify this Makefile.
Approved by:	bapt (mentor)
2018-06-08 15:05:26 +00:00
Bryan Drewery
7ccdc06829 Use simpler sed invocation.
X-MFC-With:	r334791
MFC after:	1 week
Submitted by:	danfe
2018-06-07 19:39:11 +00:00
Bryan Drewery
1930b98d49 Stop using head(1) which is not available in installworld.
installworld should not be executing this anyhow but there is some
obscure case doing it still.  The head(1) binary is not part of
ITOOLS and there's no need to add it.

MFC after:	1 week
Sponsored by:	Dell EMC
2018-06-07 16:16:22 +00:00
Justin Hibbits
b5e08a60e0 Build nvme modules for powerpc, and install man pages
NVMe builds for powerpc now, so just build modules for all powerpc targets,
and install NVMe man pages for all powerpc targets.
2018-06-07 11:25:36 +00:00
Matt Macy
b2ca2e50b9 hwpmc: add summary command and further metadata extensions
metadata changes:
- log pmc sample rate with pmcallocate
- log proc flags with thread / process logging
  to identify user vs kernel threads

fixes:
- use log cpuid to translate event id to event name

Implement rudimentary summary command to track sample
counts by thread and process name within a pmc log.

% make -j4 buildkernel >& /dev/null &
% sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15
% pmc summary foo
cpu_clk_unhalted.thread_p_any:
        idle: 138108207162
        clang-6.0: 105336158004
        sh: 72340108510
        make: 8642012963
        kernel: 7754011631
longest_lat_cache.miss:
        clang-6.0: 87502625
        sh: 40901227
        make: 5500165
        kernel: 3300099
        awk: 2000060

%  pmc summary -f ~/foo
idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 2000003
idle: 69054
clang-6.0: 52668
sh: 36170
make: 4321
kernel: 3877
hwpmc: proc(7445): 3319
awk: 1289
xargs: 357
rand_harvestq: 181
mtree: 102
intr: 53
zfskern: 31
usb: 7
pagedaemon: 4
ntpd: 3
syslogd: 1
acpi_thermal: 1
logger: 1
syncer: 1
snmptrapd: 1
sleep: 1
idx: 17 name: longest_lat_cache.miss rate: 100003
clang-6.0: 875
sh: 409
make: 55
kernel: 33
awk: 20
hwpmc: proc(7445): 14
xargs: 9
idle: 8
intr: 3
zfskern: 2
2018-06-06 02:48:09 +00:00