Commit Graph

272969 Commits

Author SHA1 Message Date
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
thorpej
853e179a3c Fix mis-placed parentheses. PR kern/54812. 2019-12-31 14:25:33 +00:00
jmcneill
a428521578 Create bus_dma tags for each device node based on _CCA and _DMA properties
found by walking up the device node tree. These tags encode range
restrictions, address translations, and whether or not the device is
cache coherent.
2019-12-31 13:54:22 +00:00
jmcneill
6a87d864d9 Include device decoding type in acpi_mem resources 2019-12-31 13:39:15 +00:00
ad
5c06357c90 Rename uvm_free() -> uvm_availmem(). 2019-12-31 13:07:09 +00:00
ad
b78a6618bd Rename uvm_page_locked_p() -> uvm_page_owner_locked_p() 2019-12-31 12:40:27 +00:00
jmcneill
439fe91982 Fetch bus_dma tags when acpi devnodes are created. They do not change
and this allows MD code to create more complex tags without being
concerned with the tag being destroyed later. While here, capture
translations offsets for address32/address64 resources.
2019-12-31 12:27:50 +00:00
ad
a31ca245b2 sys_fchdir: use LK_SHARED. 2019-12-31 11:49:08 +00:00
jmcneill
c1448d3e66 The DMA restrictions may not be defined in the direct parent of a device,
so search up the tree for a module device.
2019-12-31 11:42:46 +00:00
tkusumi
7b5209fa85 dm: Remove unnecessary inlining
These two don't really need to be inlined.
2019-12-31 10:30:30 +00:00
mlelstv
0aac85d51a Free buffers only when allocated. 2019-12-31 09:10:15 +00:00
skrll
44dc5bd335 Add another cache invalidation before reading memory for firmware query
results.
2019-12-31 08:01:19 +00:00
uki
6cb418f169 Done giving syspkg names without xorg_server_ver=110 2019-12-31 05:01:49 +00:00