Commit Graph

272731 Commits

Author SHA1 Message Date
jmcneill
8f3a886a8e Disable SPI for now (rkspi driver hangs at boot) 2020-01-01 14:15:46 +00:00
skrll
60b724fd8c Provide a single generic bcm283x_platform_uart_freq which checks for
"brcm,bcm2835-aux-uart" and returns the appropriate core clock based
results; otherwise it returns the uart clock from firmware.

Should fix early console output on the rpi0w.

Based on a diff from mlelstv
2020-01-01 13:54:32 +00:00
ad
010110684b PR kern/54821: 9.99.32 assertion in uvm_pageactivate
Looks like I forgot to commit this file yesterday.
2020-01-01 13:11:51 +00:00
jmcneill
d45d7be8b2 No need to print all supported levels at attach, print the range and total number of steps 2020-01-01 12:55:03 +00:00
tkusumi
0f41a17b1c fstyp: Consider '@' syntax in device file path for HAMMER2
though devpath is unsupported in NetBSD atm.
taken-from: DragonFlyBSD
2020-01-01 12:47:19 +00:00
jmcneill
3f26cba0bd Quiet chatty printfs 2020-01-01 12:46:44 +00:00
jmcneill
e734e7f113 Fix performance regression with previous 2020-01-01 12:18:18 +00:00
jmcneill
90d0c6959c Use correct firmware for BCM43456 2020-01-01 12:17:13 +00:00
jmcneill
abec60a52f regen 2020-01-01 12:16:14 +00:00
jmcneill
e7fc21828c Add product ID for Broadcom BCM43455 2020-01-01 12:15:53 +00:00
martin
c309bf7aef Avoid mixing signed/unsigned arguments to the ? operator. 2020-01-01 11:48:36 +00:00
tkusumi
cfa93e9fb4 fstyp: Fix build failure on i386
http://releng.netbsd.org/b5reports/i386/commits-2020.01.html#2020.01.01.10.13.16
Explicitly cast to size_t.
2020-01-01 11:46:43 +00:00
jmcneill
40fd064d65 dwcmmc improvements:
- Use mmcpwrseq resources if available
 - Only set 4- or 8-bit mode if specified in the dt properties
 - Add quirk for implementations with inverted power enable logic
 - Support switching signal voltage between 1.8V and 3.3V
 - Fix a clock divider issue on Rockchip SoCs
2020-01-01 11:21:15 +00:00
jmcneill
6be0a71782 Attach mmcpwrseq resource earlier 2020-01-01 11:18:13 +00:00
jmcneill
a073b221c4 + rk3399-pinebook-pro.dts 2020-01-01 11:17:45 +00:00
jmcneill
42147a3bf5 Add Pinebook Pro dts, from Manjaro Linux.
877ca0e728/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts
2020-01-01 11:16:15 +00:00
ryo
5b7e27ecf0 add aq(4) 2020-01-01 10:36:43 +00:00
skrll
514a9e5836 Adjust image size appropriately when using update_image
OK jmcneill
2020-01-01 10:35:10 +00:00
ryo
0422061028 note aq(4) 2020-01-01 10:18:39 +00:00
ryo
5707202b82 Add module build for aq(4) 2020-01-01 10:13:16 +00:00
ryo
6d2cfc2125 add support Aquantia AQC seriese 10G network adapters.
this driver is based on the FreeBSD version https://github.com/Aquantia/aqtion-freebsd ,
but drastically rewritten for NetBSD.
2020-01-01 10:11:21 +00:00
ryo
c8edaeb210 regen 2020-01-01 10:06:40 +00:00
ryo
ebdcf67f53 add Aquantia AQC 10G network adapters 2020-01-01 10:05:55 +00:00
ryo
8c476cf96f Add the ETHERTYPE_QINQ for 802.1ad VLAN stacking 2020-01-01 10:04:37 +00:00
maxv
dd833bd62d Fix small read overflows when parsing HID tables. Noticed by kASan the
other day while I was playing with vHCI.
2020-01-01 09:40:17 +00:00
skrll
cb6990dcf5 The DMA range doesn't cover all of memory on the bcm2711 (rpi4) - it
covers (most of) the first 1GB.
2020-01-01 09:35:50 +00:00
skrll
ff5626e1e9 Fix build for non-__HAVE_UCAS_FULL platforms where the symbol dance for
assembler functions isn't needed.

Suggestion from maxv.  Thanks.
2020-01-01 09:33:19 +00:00
maxv
046ef0bd0f Fix sizeof mismatch in copyin. This leads to a user-triggerable stack
overflow. On my test build at least, by luck, the compiler orders the
variables in a way that the overflow hits only local structures which
haven't yet been initialized and used, so the overflow is harmless.

Very easily seeable with kASan - just invoke the syscall from a 32bit
binary.
2020-01-01 09:17:45 +00:00
tkusumi
442ef904f9 fstyp: Add HAMMER1 multi-volume support (missed in "fstyp: Add HAMMER1/2 support")
taken-from: DragonFlyBSD
2020-01-01 09:17:27 +00:00
tkusumi
dcc92ff930 fstyp: Cleanup and minor sync up with FreeBSD/DragonFlyBSD 2020-01-01 09:08:52 +00:00
maxv
e85888420e Fix buffer overflows: validate the lengths at attach time, given that they
are apparently not supposed to be variable. Drop sc_ilen since it is
unused.
2020-01-01 09:08:28 +00:00
maxv
64d3794063 Fix buffer overflows. Also add missing mutex_exit. 2020-01-01 09:05:03 +00:00
maxv
8fdfc138ab Fix buffer overflows. sc_{o,f}len are controlled by the USB device. By
crafting the former the device can leak stack data. By crafting the latter
the device can overwrite the stack. The combination of the two means the
device can ROP the kernel and obtain code execution (demonstrated with an
actual exploit over vHCI).

Truncate the lengths to the size of the buffers, and also drop sc_ilen
since it is unused. Patch tested with vHCI+kASan.
2020-01-01 09:03:00 +00:00
tkusumi
ff998df0a2 fstyp: Add HAMMER1/2 support
FreeBSD has recently imported HAMMER1/2 support from DragonFlyBSD,
so why not in NetBSD as well.

taken-from: DragonFlyBSD
2020-01-01 08:56:41 +00:00
mlelstv
31a0ef4a7d Welcome to 2020. 2020-01-01 06:14:29 +00:00
mlelstv
c3c98c1554 explicitely include sys/atomic.h for atomic operations. 2020-01-01 01:18:34 +00:00
jmcneill
b5bf413ce5 Add clk provider 2020-01-01 00:38:30 +00:00
kre
6b4ce10f36 Make recent change build for SMALL builds as well as normal ones. 2020-01-01 00:24:52 +00:00
ad
60fa01590b Fix rump. 2019-12-31 23:32:05 +00:00
ad
94843b1390 - Add and use wrapper functions that take and acquire page interlocks, and pairs
of page interlocks.  Require that the page interlock be held over calls to
  uvm_pageactivate(), uvm_pagewire() and similar.

- Solve the concurrency problem with page replacement state.  Rather than
  updating the global state synchronously, set an intended state on
  individual pages (active, inactive, enqueued, dequeued) while holding the
  page interlock.  After the interlock is released put the pages on a 128
  entry per-CPU queue for their state changes to be made real in batch.
  This results in in a ~400 fold decrease in contention on my test system.
  Proposed on tech-kern but modified to use the page interlock rather than
  atomics to synchronise as it's much easier to maintain that way, and
  cheaper.
2019-12-31 22:42:50 +00:00
ad
390497c1f5 NetBSD 9.99.32 - struct vm_page changed 2019-12-31 21:35:25 +00:00
jmcneill
dd6be2314d Remove a stupid printf 2019-12-31 20:47:05 +00:00
tsutsui
475a622639 Fix dmesg(8) to preserve leading whitespaces of kernel messages.
Closes PR/54729.
2019-12-31 19:58:56 +00:00
skrll
f9e25f1249 Remove a stray ' 2019-12-31 18:11:18 +00:00
skrll
dcf4541802 Improve a comment 2019-12-31 18:09:21 +00:00
ad
096b37b548 struct vm_page: cluster fields most heavily used by the page allocator and
uvmpdpol at the start of the structure, so that while under global lock we
need only touch one cache line for each vm_page.  There is still the problem
of vm_page not being aligned, but this seems to drop lock wait time for
(a modified) uvmpdpol and the allocator by 20-30% in a quick test.
2019-12-31 17:56:16 +00:00
jmcneill
0dc1816edd Rely on 32/64-bit overflow to calculate translation offsets. Store this
as a separate ar_xbase field in acpi_mem instead of having separate
ar_offset and ar_decode fields.
2019-12-31 17:26:04 +00:00
pgoyette
1056200d86 Update to not include COMPAT_90 2019-12-31 15:07:22 +00:00
pgoyette
956f25580a Another rename from uvm_free() --> uvm_availmem() 2019-12-31 14:51:29 +00:00
thorpej
13cf28f27d Fix mis-placed parentheses. PR kern/54813. 2019-12-31 14:27:50 +00:00