summaryrefslogtreecommitdiff
path: root/sys/dev
AgeCommit message (Collapse)Author
2020-05-22regenPatrick Wildt
2020-05-22Add Atheros QCA986x/988x PCI ID.Patrick Wildt
2020-05-22Add support for the Marvell Xenon SDHC. This is used on the ArmadaPatrick Wildt
3700 and 8040 SoCs and allows me to use an SD card as storage on the Turris Mox. It also should make eMMC/SD show up on the MACCHIATObin. ok kettenis@
2020-05-22Add pre/post hooks for bus clock changes to sdhc(4). These will bePatrick Wildt
used by sdhc(4) attachment drivers to do additional MD initialization. ok kettenis@
2020-05-22Use the parsed address and interrupt information fromMark Kettenis
struct acpi_attach_args. tpm(4) tested by kn@ ok jmatthew@
2020-05-22Attach mvpinctrl(4) to the Armada 3700's NB as well. As a consequencePatrick Wildt
mvclock(4) cannot attach to the NB's xtal clock anymore. Instead, have mvpinctrl(4) attach the xtal clock. With this we can use the SD card detect pins on the Turris Mox. ok kettenis@
2020-05-22Always defer attaching the mvneta(4) interfaces. Otherwise thisPatrick Wildt
leads to unsorted interface lists in ifconfig and the installer, depending on hardware configuration. ok kettenis@
2020-05-22And add the node to the struct. Sometimes I maybe shouldn't try splitingPatrick Wildt
up diffs before committing.
2020-05-22Actually store the node in the softc. Missed chunk from the previousPatrick Wildt
commit.
2020-05-22Some sdhc(4) on FDT use a card-detect GPIO or have a non-removable flag.Patrick Wildt
If those properties exist, use those to detect a card. ok kettenis@
2020-05-22Add mvkpcie(4), a driver for the Aardvark PCIe controller found onPatrick Wildt
the Armada 3700 SoC. So far only MSI is supported, since it was easier to implement. Both MSI and INTx share a single interrupt pin, so there's nothing to gain anyway, apart from legacy device support. With this I can push traffic through a bwfm(4) in my Turris Mox. ok kettenis@
2020-05-21regenPatrick Wildt
2020-05-21ASMedia ASM1182e PCIe switch.Patrick Wildt
2020-05-21Kill commented out czttypoll() routine.Martin Pieuchot
ok visa@
2020-05-21Make use of checksum offloads. Very little effort required from theJonathan Matthew
driver here. remi@ observed a small but noticeable improvement in packet forwarding performance, and I saw a significant increase in TCP receive throughput, especially with high MTU. ok dlg@
2020-05-20Open up a 4GB memory bus window for mvneta(4) on the MarvellPatrick Wildt
Armada 3700. This makes my second ethernet controller/port work on the Turris Mox. ok kettenis@
2020-05-20Extend drmkqfilter() to support EVFILT_READ and match drmpoll() behavior.Martin Pieuchot
Locking `event_lock' in filt_drmread() is currently commented out as it requires some refactoring to use proper 'struct drm_minor' like upstream. That said, it is fine as long as all the code is run under KERNEL_LOCK(). ok visa@
2020-05-19We need to double the clock frequency for DDR modes.Mark Kettenis
2020-05-19Don't provide backlight control if the list returned by _BCL is empty.Mark Kettenis
Prevents crashes on broken AML. ok jcs@
2020-05-19Use static inline instead of inline; fixes ramdisk build.Mark Kettenis
2020-05-19Implement kqueue(2) support.Martin Pieuchot
Assert that the KERNEL_LOCK() has to be held before grabbing `audio_lock' to prevent lock ordering issues inside selwakeup(). ok visa@, ratchov@
2020-05-18Offload CCMP (WPA2) encryption and decryption to iwm(4) hardware.Stefan Sperling
This reduces CPU load during traffic bursts. Based on an older diff we had in CVS history, updated to work with newer firmware versions we use today. Tested on the following devices, with great support from several people: 3160 (stsp) 3168 (stsp) 7260 (jmatthew, tobhe) 7265 (stsp, procter, gonzalo) 8265 (benno, tb) 8260 (stsp, Liberto on bsd.network) 9260 (stsp, Jesper Wallin) 9560 (stsp) Not tested: 3165; these run the same firmware as 7265 so will likely be fine. I couldn't find a 3165 device in my pile. ok jmatthew@ (who also found a small bug in my diff)
2020-05-18During the rekey operation, we feedback 1 word to the lowest level.Theo de Raadt
But it was a constant, that is really silly. Pass back the first word from the middle layer. ok visa
2020-05-18Turn power domain on. Makes OpenBSD boot on the odroid c4.Mark Kettenis
2020-05-18Add some comments.Mark Kettenis
2020-05-18Add amlpwrc(4), a driver for the power domain controller found on variousMark Kettenis
Amlogic SoCs.
2020-05-17Fix typo in comment.Mark Kettenis
2020-05-17Add support for the SM1 variant and (probably) fix support for the CPUMark Kettenis
clock on the G12A variant.
2020-05-17restore VGA fonts on VT switchJonathan Gray
Avoids an unusable screen when switching to a VT with a custom VGA font from X. While it is possible to modify the xserver to invoke an ioctl for this kettenis@ points out the xserver may have crashed so doing it in the kernel is preferred. Problem reported by and patch from John Carmack. Changed slightly to do the vga_restore_fonts() (write to video memory) call before vga_setfont() (pointing the character generator at it) at the suggestion of kettenis@. ok kettenis@
2020-05-17Add function for attaching RTC drivers, to reduce direct useVisa Hankala
of todr_handle. OK kettenis@
2020-05-17Prevent kcov from collecting coverage after the kernel has panicked.anton
This could happen if curproc had kcov enabled while panicking. ok mpi@ visa@
2020-05-17fix typo in a commentJonathan Gray
from Delyan Raychev
2020-05-16entropy_add_ptr and entropy_input_rotate are only used insideTheo de Raadt
enqueue_randomness(), so make them local static instead of global.
2020-05-16be more consistant about with using sizeof(object) rather than the constantTheo de Raadt
defining the [size]
2020-05-16Fix PHY_CONTEXT commands sent to iwx(4) firmware.Stefan Sperling
iwx(4) firmware understands two different variants of these commands. Both variants are documented with the same command API version number, but they use different sizes for an embedded struct which contains information about channels. Which variant to use depends on whether the firmware advertises support for the "ULTRA_HB_CHANNELS" feature. The code I wrote to handle both cases had a bug in case this feature is not supported: The channel info size difference was only accounted for while computing the command's length, but not while writing command data. This bug does not affect devices presently matched by iwx(4). But it is possible that other devices may need this fix in the future. So, for now, fix the buggy code path instead of removing it. ok mpi@
2020-05-16Don't attempt to reset the state of the flip-flop associated with theJonathan Gray
vga attribute controller index or set the enable/'palette address source' bit when saving and restoring 256 colour vga palette with 0x3c6-0x3c9 as this does not touch the attribute registers. When this code was ported from FreeBSD in vga.c rev 1.48 the flip-flop reset parts were mistakenly made to read 0x3ca instead of 0x3da. Fixes a problem with VirtualBox where the text mode background was a dim red colour instead of black after VT switch. Problem reported by and patch from John Carmack. ok matthieu@ who notes this also fixes a similiar problem with a KVM / virt-manager virtual machine.
2020-05-16Use softintr to call selwakeup() in the mixer code code-pathAlexandre Ratchov
ok mpi
2020-05-16Implement kqueue(2) support.Martin Pieuchot
ok visa@
2020-05-16remove unused debug statementsanton
2020-05-16In preparation for stopping coverage collection once the kernel hasanton
panicked, extract common parts between the two coverage collection functions to a new helper called kd_curproc(). While here, sprinkle a few branch prediction hints borrowed from NetBSD. ok mpi@ visa@
2020-05-15Fix CCMP replay check with 11n Rx aggregation and CCMP hardware offloading.Stefan Sperling
So far, drivers using hardware CCMP decryption were expected to keep the most recently seen CCMP packet number (PN) up-to-date, and to discard frames with lower PNs as replays. A-MPDU subframes may legitimately arrive out of order, and the drivers skipped CCMP replay checking for such frames. Re-ordering happens in ieee80211_inputm(), after the driver is done with a frame. Drivers cannot tell replayed frames apart from legitimate out-of-order retransmissions. To fix this, update the PN value in ieee80211_inputm() after subframes have been reordered into their proper sequence. Drivers still perform replay checks but they no longer have to worry about updating the last seen PN value. The 802.11 spec confirms that replay checking is supposed to happen after A-MPDU re-ordering. Tested by jmc@, benno@, solene@, and myself with the following drivers: athn(4), iwn(4), iwm(4), wpi(4), urtwn(4) ok solene@
2020-05-15Some newer bwfm(4) chips from Cypress hold their regulatoryPatrick Wildt
constraints in a separate blob, instead of in the firmware. This .clm_blob needs to be loaded as well.
2020-05-15Describe the purpose of add_entropy_words() in simpler terms.Theo de Raadt
2020-05-15The description of the enqueue_randomness() input parameter was crazy untrue.Theo de Raadt
2020-05-15Explain enqueue_randomness() better. It is the supply-entropy function,Theo de Raadt
and change wording from 'entropy queue', what we have is a ring which collects 'damage' from successive calls until drawn down
2020-05-15The long explanation for CRC stirring isn't helping. If anythingTheo de Raadt
it suggests we should reconsider this mechanism and do something simpler... delete the explanation for now.
2020-05-15The main comment block from 1996 has become highly inaccurate andTheo de Raadt
misleading, so rewrite it. The interesting parts are bootblock-seeding from file + hwrng, arc4random() being available incredibly early, and seperate timeouts to pull entropy data forward into a stir of the chacha state (one for entropy ring crc whitening into a buffer, the 2nd for buffer folding into the chacha) Now that it is better documented, I can try to improve each component.
2020-05-15remove unneccessary include filesTheo de Raadt
2020-05-15Fix wrong firmware API documentation comments for iwm(4) and iwx(4).Stefan Sperling
Both drivers currently use SCAN_CHANNEL_CFG_S_VER1, not VER2.
2020-05-15drm/amdgpu: Change VCE booting with firmware loaded by PSPJonathan Gray
From James Zhu aa5873dca46385454d36c3dca31d66d7b64574be in mainline linux prevents hang on boot with vega10_sos.bin firmware from linux-firmware 20200421 https://bugs.freedesktop.org/show_bug.cgi?id=110733