Commit Graph

259838 Commits

Author SHA1 Message Date
christos
f4654072f5 recognize noinline attribute 2018-07-08 17:48:42 +00:00
christos
5f0ef7927c use += :-) 2018-07-08 17:01:02 +00:00
christos
3f9732689e add the efi boot blocks
XXX: pullup-8
2018-07-08 16:55:37 +00:00
christos
4522373d91 enable coff/pe executable vectors for i386 for the efi bootblocks.
XXX: pullup-8
2018-07-08 16:53:56 +00:00
christos
7d350d60db Enable efiboot on i386, for 32 bit bootblocks 2018-07-08 16:50:27 +00:00
christos
de03d6cb9a correct previous cast. 2018-07-08 16:48:47 +00:00
christos
606587dd27 cast for lint 2018-07-08 16:39:27 +00:00
kamil
6f555b3c28 Revert previous
Misalignment access handling patches are now discussed on tech-kern.

Requested by <martin> and <christos>.
2018-07-08 14:46:23 +00:00
kamil
bed39f819f Try to avoid signed integer overflow in callout_softclock()
The delta operation (c->c_time - ticks) is documented as safe, however it
still can cause overflow in narrow case scenarios.

Try to avoid overflow/underflow or at least make it less frequent with
a direct comparison of c->c_time and tics. Perform the operation of
subtraction only when c->c_time > ticks.

sys/kern/kern_timeout.c:720:9, signed integer overflow: -2147410738 - 72912 cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

Patch suggested by <Riastradh>
2018-07-08 14:42:52 +00:00
jmcneill
9b4fa6e5ac Use psci_fdt_bootstrap for MP spinup on Tegra210. 2018-07-08 11:37:50 +00:00
spz
886b6dfbaa add identification for some Yubikeys 2018-07-08 08:32:53 +00:00
pgoyette
479de0138a Use a different, type-insensitive idiom for CLR().
As discussed on IRC and proposed by dholland@, the existing idiom is
type-sensitive, and will likely fail silently when the flags variable
is a 64-bit type.

No functional change intended.  If anything breaks, it was probably
already broken.
2018-07-08 06:21:41 +00:00
snj
8bde513f21 prompted by dh's latest PR, add a missing word: academia 2018-07-08 04:50:14 +00:00
kamil
090f61f3df Remove unaligned access to mpbios_page[]
Replace unaligned pointer dereference with a more portable construct that
is free from Undefined Behavior semantics.

sys/arch/x86/x86/mpbios.c:308:11, load of misaligned address 0xffff800031c7a413 for type 'const __uint16_t' which requires 2 byte alignment

Detected with Kernel Undefined Behavior Sanitizer
2018-07-07 23:05:50 +00:00
kamil
d568df3e3f Correct unportable signed integer left shift in i386/amd64 tss code
Change the type of IOMAP_INVALOFF to unsigned int.

sys/arch/amd64/amd64/machdep.c:518:42, left shift of 65535 by 16 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.
2018-07-07 21:35:16 +00:00
jmcneill
341b057091 Use arm_generic_bs_tag instead of armv7_generic_bs_tag and conditionally
define SOC platform support (so we don't try to build 32-bit support into
64-bit kernels).
2018-07-07 20:16:16 +00:00
christos
a87d179511 Fix the logic for the non auto case 2018-07-07 15:44:27 +00:00
jmcneill
b6b3ceffae Switch to PSCI 0.1 mode only if the first compatible string listed on /psci is "arm,psci" 2018-07-07 15:11:07 +00:00
prlw1
6bbd42ad3e regen 2018-07-06 14:58:22 +00:00
prlw1
609fff7881 Add Western Digital (Sandisk) WD Black NVMe SSD as per suggestion
from thorpej@
2018-07-06 14:46:27 +00:00
kamil
2cbaf36e20 Remove UB from definition of symbols in i915_reg.h
Kernel Undefined Behavior Sanitizer enforces more warnings in build time.
This makes the build fatal in the drm/i915 code in:
 - intel_ddi_put_crtc_pll(),
 - intel_ddi_clock_get(),
 - intel_ddi_pll_enable(),
 - intel_ddi_setup_hw_pll_state().

The error message in all the cases says:

  error: case label does not reduce to an integer constant

Set the type of the value left shifted to unsigned.

This change is required to build NetBSD/amd64 with KUBSan.
2018-07-06 12:19:56 +00:00
martin
7afa4d19cf Explicit libheimbase dependency, similar to Christos' change to
libheimntlm/Makefile, hopefully fixing another MKREPRO fallout.
XXX pullup 8
2018-07-06 08:54:30 +00:00
martin
ed5800cebe Add explicit path to libwind - patch from Christos, may fix some MKREPRO
fallout. XXX pullup 8
2018-07-06 08:31:43 +00:00
msaitoh
1a02097c84 Add force_10_100_autonego sysctl. The default vaule is 0(false).
This sysctl is only for 550EM_a with PHY firmware for a while.
2018-07-06 02:36:35 +00:00
msaitoh
5e5ff2a5f0 Add PMA/PMD control 2 register bit definitions. 2018-07-06 01:58:12 +00:00
christos
67420ca6b3 Add an "auto" keyword to auto-determine the link address from the inet addr. 2018-07-06 00:50:05 +00:00
jmcneill
81f085d69d Print USB_SPEED_SUPER_PLUS capability if present 2018-07-05 19:46:58 +00:00
martin
a1ed1388c0 Temporary hack to get MKREPRO debug info out of the build cluster. XXX revert! 2018-07-05 15:52:27 +00:00
jmcneill
6574582f8d Replace sscom with a much simpler uart driver. The simpler driver is 1/4th
the size and has the added benefit of not freezing when an arrow key is
pressed.
2018-07-05 13:11:57 +00:00
jmcneill
79c41704e9 Use KERNEL_IO_VBASE instead of magic number 2018-07-05 13:11:03 +00:00
triaxx
7d3291fe74 Fix an inconsistency that showed /var/db/duid in the man page while the
binary opened /var/db/dhcpcd/duid.
2018-07-05 05:41:17 +00:00
jmcneill
fb1b6b4d24 Enable booting of netbsd-EXYNOS kernel 2018-07-04 23:10:06 +00:00
jmcneill
76640a8f95 Add expwm, pwmfan 2018-07-04 23:08:29 +00:00
jmcneill
aba8b2b275 Add basic pwm-fan driver. This doesn't have any smarts yet other than
turning the fan on at 100% duty cycle.
2018-07-04 23:08:06 +00:00
jmcneill
adc41efb5b Add driver for Exynos PWM timer. 2018-07-04 23:06:54 +00:00
jmcneill
bfa0614efd Add pwm clocks 2018-07-04 23:06:28 +00:00
jmcneill
637d09aaa9 Align AUDIOCORE size to 1M, and add definition for SYSRAM 2018-07-04 23:06:05 +00:00
jmcneill
38b0f7f666 Remove some duplicate code 2018-07-04 22:16:42 +00:00
jdolecek
f7aa9c4174 sync SK_IMTIMER_TICKS_YUKON value with OpenBSD (likely pasto) 2018-07-04 19:37:10 +00:00
jdolecek
c96d053d99 use pci_intr_establish_xname() 2018-07-04 19:26:09 +00:00
christos
b1ffb99e21 merge duplicated code, more informative debugging. 2018-07-04 19:20:25 +00:00
kamil
1d52842d90 Avoid undefined behavior in lwp_ctl_free()
Do not left shift signed integer in a way that the signedness bit is
changed.

sys/kern/kern_lwp.c:1892:29, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

Reported by <Harry Pantazis>
2018-07-04 18:15:27 +00:00
kamil
85b6812c20 Avoid undefined behavior in lwp_ctl_alloc()
Do not left shift signed integer in a way that the signedness bit is
changed.

sys/kern/kern_lwp.c:1849:27, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

Reported by <Harry Pantazis>
2018-07-04 18:13:01 +00:00
kamil
3884f1a8ff Avoid undefined behavior in mq_send1()
Do not shift a signed integer causing change of the signed bit.

sys/kern/sys_mqueue.c:881:23, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

Reported by <Harry Pantazis>
2018-07-04 17:50:18 +00:00
kamil
98eac77405 Avoid undefined behavior in mq_recv1()
Do not shift a signed integer causing change of the signed bit.

sys/kern/sys_mqueue.c:712:24, left shift of 1 by 31 places cannot be represented in type 'int'

Detected with Kernel Undefined Behavior Sanitizer.

Reported by <Harry Pantazis>
2018-07-04 17:39:12 +00:00
maya
946ae7774a Add EBDA. 2018-07-04 15:38:46 +00:00
gdt
d4213b693d RPI: remove commented-out pseudodevices
Remove a number of commented out pseudodevice lines that are
duplicative with GENERIC.common.  Othewise, someone might think it
reasonable to uncomment or add them.

For now, a number of pseudodevices that are not in GENERIC.common
remain, pending comments on the larger-scale rototill.
2018-07-04 13:32:01 +00:00
jmcneill
a889177c6e Only process a tx or rx interrupt if the pending bit is set. 2018-07-04 13:14:51 +00:00
maya
7ed863e55f Claim to have getopt_long.
We do, and packages occasionally expect the long options to exist.
Pointed out while investigating
PR pkg/53425: graphics/py-matplotlib 2.2.2 import fails
(which is not fixed by this commit)
2018-07-04 12:25:48 +00:00
maya
adc23db869 Disable MWAIT/MONITOR on Apollo Lake CPUs to workaround APL30 errata.
We use MWAIT/MONITOR to hatch secondary CPUs. The errata means that
the wakeup may not happen, so SMP boot fails.
Use wrmsr to disable it in hardware too, for extra paranoia.

PR port-amd64/53420,
also reported on netbsd-users by joern clausen and ssartor.
2018-07-04 07:55:57 +00:00