Commit Graph

259700 Commits

Author SHA1 Message Date
kamil
74f0dd3b90 Specify NOSANITIZER in distrib/amd64/ramdisks/common
This option cannot be set in distrib/common/Makefile.distrib as it's too
late, after including <bsd.own.mk> that will set MKSANITIZER.

This makes generation of ramdisk for amd64 with MKSANITIZER=yes successful.
2018-06-21 11:48:05 +00:00
kamil
64a497de12 Refactor MKSANITIZER flags in mk rules
Introduce a new variable SANITIZERFLAGS that contains all the sanitizer
specific flags. These flags are designed to be passed to CFLAGS, CXXFLAGS
and LDFLAGS.

Pass SANITIZERFLAGS in bsd.prog.mk rules to CFLAGS, CXXFLAGS and LDFLAGS.

Pass SANITIZERFLAGS in bsd.lib.mk rules to *_pic.a build flags. The *_pic.a
libraries are designed to construct .so libraries. All .so libraries with
few exceptions are expected to be prebuilt with a sanitizer. Another
purpuse of *_pic.a files can be constructing static PIE programs, however
they are not supported as of now and there is no sanitization of static
programs either.

Once MKSTATICPIE will be supported, it will be initially incompatible with
MKSANITIZER.

This change also makes it easier to build other targets like kernel and
kernel modules without userland sanitizers.

No functional change intended for MKSANITIZER=no users.
2018-06-21 11:24:38 +00:00
kamil
69ca0c2f24 Make building of dhcp compatible with MKSANITIZER
Disable LD flags (-Wl,-Bstatic and -Wl,-Bdynamic) with enabled MKSANITIZER.
These options are incompatible with the current design of sanitizers,
because they cause duplication of symbols into programs and thus symbols
from the interceptors from sanitizers cannot be linked.

This change makes effectively mounting /usr required for dhcp programs like
dhclient(8).
2018-06-21 11:02:48 +00:00
kamil
b6ed70bb6e Add new option -s to crunchgen(1) -- enable sanitization
As of today typical sanitizers require dynamic executables, while
crunchgen(1) programs are produced with static properties.

Lack of specified -s will:
 - generate a Makefile file with NOSANITIZER=
 - build programs that are dependencies with NOSANITIZER=

In future there is an option to handle sanitization in statically linked
programs.

An idea with -s LGTM by <christos>
2018-06-21 10:55:54 +00:00
jmcneill
e700149f57 Enable DWC3 USB DRD (host mode) on Rock64. 2018-06-21 10:46:39 +00:00
jmcneill
fe14544e93 Add support for RK3328 2018-06-21 10:45:25 +00:00
kamil
0e6099283a Set NOSANITIZER in rescue/Makefile
This is required to stop sanitizing rcmd.o and liboverride.o. These object
files will be linked into statically linked rescue.
2018-06-21 10:44:01 +00:00
kamil
f4a6ea5271 Disable SANITIZER for ldd(1)
These utilities (elf32, elf32_compat, elf64, liblldb) share code with the
ELF dynamic loader that is not being sanitized and its symbols are
installed into sanitized programs (in particular __tls_get_addr()).

Additionally libldd is used in rescue that is not expected to be sanitized
as of today.
2018-06-21 10:41:45 +00:00
knakahara
a1b205bf0e sbappendaddr() is required any lock. Currently, softnet_lock is appropriate.
When rip_input() is called as inetsw[].pr_input, rip_iput() is always called
with holding softnet_lock, that is, in case of !defined(NET_MPSAFE) it is
acquired in ipintr(), otherwise(defined(NET_MPSAFE)) it is acquire in
PR_WRAP_INPUT macro.
However, some function calls rip_input() directly without holding softnet_lock.
That causes assertion failure in sbappendaddr().
rip6_input() and icmp6_rip6_input() are also required softnet_lock for the same
reason.
2018-06-21 10:37:49 +00:00
msaitoh
93d0a5567f Simplify & white space fix. No functional change. 2018-06-21 09:09:50 +00:00
sevan
1bb226fbbf An acronym entry needs to be all uppercase.
Thanks to Thorsten Glaser
2018-06-20 21:53:15 +00:00
jdolecek
c5bd683ff6 as a stop-gap, make fpuinit_mxcsr_mask() for native independant of
XSAVE as it should be, only xen case checks the flag now; need to
investigate further why exactly the fault happens for the xen
no-xsave case

pointed out by maxv
2018-06-20 20:43:20 +00:00
jmcneill
b49c704e08 Add missing return in error path 2018-06-20 20:12:51 +00:00
thorpej
3448be6035 Revert previous. 2018-06-20 19:11:01 +00:00
maxv
a79f020658 Use PMAP_DIRECT_UNMAP. 2018-06-20 11:57:22 +00:00
maxv
bb09e40cae Add and use bootspace.smodule. Initialize it in locore/prekern to better
hide the specifics from the "upper" layers. This allows for greater
flexibility.
2018-06-20 11:49:37 +00:00
maxv
3debc574fe Put these arrays in .rodata, they aren't supposed to be executable. 2018-06-20 11:45:25 +00:00
msaitoh
e593c26021 Regen. 2018-06-20 09:10:52 +00:00
msaitoh
f63a82f385 Add nSYS Technologies. 2018-06-20 09:10:33 +00:00
hkenken
0988119362 Add l2cc support. 2018-06-20 08:03:55 +00:00
hkenken
8b06bd99ec Move intr_establish() before imxuart_attach_subr(). 2018-06-20 07:08:35 +00:00
hkenken
da71e27bf3 Modified CCM register defines. 2018-06-20 07:05:37 +00:00
hkenken
c59f041792 Rename a9tmr to arma9tmr. 2018-06-20 05:59:22 +00:00
thorpej
a6ccc291a7 In fdtbus_print(), aprint_normal the path to the device (rather than
aprint_debug).  This info is every bit as useful as, say, PCI device
locations.
2018-06-20 05:59:17 +00:00
hkenken
f0cd4794fa Fix typo. 2018-06-20 05:53:19 +00:00
hkenken
42ade95dce Support Cortex-A9 (addr_d > addr_c). 2018-06-20 05:50:09 +00:00
msaitoh
e1de590d3d Style fix. No functional change. 2018-06-20 05:19:12 +00:00
hkenken
706c652852 Use mpcaa_off1 parameter for mapping subregion. 2018-06-20 05:01:39 +00:00
msaitoh
d6138c5ea5 Whitespace fix. No functional change. 2018-06-20 04:04:50 +00:00
maya
216c3542f7 Add test case for PR lib/50646.
Make sure that cabsl (aka __c99_cabsl) is usable from C++.
2018-06-20 03:51:27 +00:00
maya
c017cf6e31 Strip -Wsystem-headers from CXXFLAGS.
GCC's C++ headers are not clean (yet). They are trying, but haven't got there
yet.

Necessary for including <atf-c++.hpp> which uses <sstream>.
2018-06-20 02:15:13 +00:00
jmcneill
517d79ffbb Disable threshhold mode for TX/RX DMA and ignore tx_delay/rx_delay props
for now. Fixes GMAC on RK3328.
2018-06-19 23:43:11 +00:00
uwe
c9265f9539 Make the error message from pms_alps_probe_init() an error again now
that we don't misidentify almost anything as an ALPS device.  Reset if
E6 check failed as well.
2018-06-19 23:25:59 +00:00
uwe
8d0c8bff34 Don't pass response buffer to the reset command since we are not
interested in it (pckbport_poll_cmd() is smart enough).
2018-06-19 23:03:28 +00:00
uwe
2b77c4cdd5 If the first byte of E7 signature is not 0x73, it's not an ALPS
device, so don't complain we failed to initialize it.  Still need a
reset, b/c the E7 check will be interpreted as normal commands by a
normal device.
2018-06-19 22:53:17 +00:00
jmcneill
a4c07ed004 dwcmmc: set ciu clock rate rather than assuming fixed input rate 2018-06-19 22:44:33 +00:00
uwe
13f76e26c2 When E6 signature is checked, ignore pressed buttons. 2018-06-19 21:47:28 +00:00
uwe
cd9108c6ed Use PMS_SEND_DEV_STATUS for E9 instead of PMS_GET_SCALE (also defined
as E9).  This is more readable and is congruent with other drivers.
Same object code is generated.
2018-06-19 21:21:04 +00:00
jdolecek
18191e00de actually Xen XSAVE support itself is bigger deal than the AVX alone, so mention
that more prominently
2018-06-19 19:57:45 +00:00
jdolecek
d213fd807f note the Xen AVX fix 2018-06-19 19:53:42 +00:00
jdolecek
9f41b66436 fix FPU initialization on Xen to allow e.g. AVX when supported by hardware;
only use XSAVE when the the CPUID OSXSAVE bit is set, as this seems to be
reliable indication

tested with Xen 4.2.6 DOM0/DOMU on Intel CPU, without and with no-xsave flag,
so should work also on those AMD CPUs, which have XSAVE disabled by default;
also tested with Xen DOM0 4.8.3

fixes PR kern/50332 by Torbjorn Granlund; sorry it took three years to address

XXX pullup netbsd-8
2018-06-19 19:50:19 +00:00
jmcneill
7a2303fd1d Install RK3328 .dtb files to the correct location 2018-06-19 15:13:51 +00:00
jmcneill
81171f787d Increase reserved space at start of image from 4MB to 16MB to make room
for Rockchip bootloaders.
2018-06-19 15:12:05 +00:00
jmcneill
14738837cf Use symbolic names for chip revision. NFC. 2018-06-19 10:36:41 +00:00
maxv
f9e8f3a48f When using EagerFPU, create the fpu state in execve at IPL_HIGH.
A preemption could occur in the middle, and we don't want that to happen,
because the context switch would use the partially-constructed fpu state.

The procedure becomes:

	splhigh
	unbusy the current cpu's fpu
	create a new fpu state in memory
	install the state on the current cpu's fpu
	splx

Disabling preemption also ensures that x86_fpu_eager doesn't change in
the middle.

In LazyFPU mode we drop IPL_HIGH right away.

Add more KASSERTs.
2018-06-19 09:25:13 +00:00
gson
036399b6f4 No semicolon after macro do ... while (0) wrapper. 2018-06-19 09:20:46 +00:00
maxv
c6e8e773a7 Explicitly clear l2's pcb_fpcpu when forking.
A context switch (preemption) could occur between

	fpusave_lwp(l1, true);
and
	memcpy(pcb2, pcb1, sizeof(struct pcb));

In this case, l1's FPU state is re-installed on the current CPU, and
pcb1->pcb_fpcpu becomes non NULL. While it's fine to have l1's state
installed, we don't want to indicate l2's state is installed too.

With lazy fpu this was not a problem, because the context-switch would
not re-install the state, so pcb1->pcb_fpcpu was NULL.

Should fix PR/53383.
2018-06-19 07:23:44 +00:00
msaitoh
c838c9bb48 Regen. 2018-06-19 05:14:36 +00:00
msaitoh
08d559b1e2 All of 88E151[0248]'s model number is 0x001d. 2018-06-19 05:14:16 +00:00
thorpej
31877e2554 Sigh, fix another stupid mistake in previous that squeaked by because,
again, I booted the wrong test kernel.
2018-06-19 04:10:51 +00:00