summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2018-07-09Use function name in panic string, like in some other places.Claudio Jeker
OK henning@ benno@
2018-07-09Add bnxt(4), a driver for Broadcom NetXtreme-C/E 10G+ ethernet.Jonathan Matthew
Sort of a port from freebsd, but I had to write all the interesting bits myself. Not very complete yet, but good enough to commit over. ok kettenis@ deraadt@
2018-07-09Add a few common PCIe devices based on the arm64 kernel configs.Patrick Wildt
2018-07-09dd mvpcie(4), a driver for the Marvell ARMADA 38x PCIe controller,Patrick Wildt
as implemented in the SolidRun Clearfog and Turris Omnia. ok kettenis@
2018-07-09Enable ampintcmsi(4), pciecam(4) and PCIVERBOSE.Patrick Wildt
ok kettenis@
2018-07-09Introduce pciecam(4), a driver for generic ECAM compatible PCI hostPatrick Wildt
controllers. ok kettenis@
2018-07-09Add PCI machdep headers based on the arm64 port.Patrick Wildt
ok kettenis@
2018-07-09Implement ampintcmsi(4) in ampintc(4) to support MSI. The GICv2M is anPatrick Wildt
extension to the GIC controller, which is represented as subnode in the device tree. There can be multiple GICv2Ms, so it makes sense to attach those to ampintc(4) as some kind of simplebus. The GICv2M is simply an interrupt generator that can be used by PCIe devices to ring the door bell. There is no need for further configuration, we only need to find out which SPIs we are allowed to use for MSI and to register an edge triggered interrupt on a (randomly) allocated SPI. Implement support for interrupt types. The GIC only seems to support level triggered active-high or egdge triggered low-to-high interrupts. We currently always configure them to be level triggered, which is a sane default for most controllers. Since MSI interupts on the GIC are edge triggered, we need to be able to parse the type information and to configure the interrupt correspondingly. ok kettenis@
2018-07-09Add an API to add and delete windows in the mvmbus(4) controller. ThisPatrick Wildt
will be used by the PCIe controller to set up the memory regions for the PCIe devices. Also export the PCIe IO and MEM address regions. These will be used to setup the PCIe extents. ok kettenis@
2018-07-09Make free(9) MP safe. It was wrong to set ku_indx to 0 after freeingAlexander Bluhm
the memory in uvm. Another process could use the false 0 then. To be on the safe side, protect all access to ku_indx and ku_pagecnt with a mutex. Update ku_indx and ku_pagecnt before calling uvm_km_free(). Update ksp after uvm_km_free() to keep accounting correct. tested by sthen@; OK mpi@ visa@ deraadt@
2018-07-09Add retguard macros to aes_intel.mortimer
ok sthen@
2018-07-09Use a slightly more efficient zeroing idiom when clearing GPRsPhilip Guenther
ok mlarkin@ mortimer@
2018-07-09Nuke unused define 'nfsm_writereply()'.Kenneth R Westerback
ok beck@ deraadt@ guenther@ mpi@
2018-07-08regenthfr
2018-07-08add AMD Summit Ridge (17h) and Raven Ridge PCI devices. ok brynet@thfr
2018-07-08"id" is too generic, rename to "rdomain" for clarity and easier greppingJeremie Courreges-Anglas
ok benno@ mpi@
2018-07-08Use the same test pattern as for enc_ifps, for consistencyJeremie Courreges-Anglas
ok denis@
2018-07-07Fix an argument type error that happens when translating fcntl(F_SETOWN)Visa Hankala
to ioctl(TIOCSPGRP). The ioctl handlers expect a pointer to an int, so read the argument into a local int variable and pass the variable's address to the handler instead of referencing SCARG(uap, arg) directly. OK guenther@, mpi@
2018-07-07Remember to lock v_specparent for VOP operations.Visa Hankala
OK anton@, mpi@
2018-07-07Fix a locking error in spec_setattr(). Unlike many VOP operations,Visa Hankala
VOP_SETATTR() does not release the vnode lock (and it has never done the unlocking in the past). Therefore spec_setattr() has to keep the argument vnode locked and unlock v_specparent instead after the nested VOP_SETATTR() call. Fixes a WITNESS panic found by anton@ OK anton@, mpi@
2018-07-07Release the kernel lock fully on thread exit. This prevents a lockingVisa Hankala
error that would happen otherwise when a traced and stopped multithreaded process is forced to exit. The error shows up as a kernel panic when WITNESS is enabled. Without WITNESS, the error causes a system hang. sched_exit() has expected that a single KERNEL_UNLOCK() would release the lock completely. That assumption is wrong when an exit happens through the signal tracing logic: sched_exit exit1 single_thread_check single_thread_set issignal <-- KERNEL_LOCK() userret <-- KERNEL_LOCK() syscall The error is a regression of r1.216 of kern_sig.c. Panic reported and fix tested by Laurence Tratt OK mpi@
2018-07-07Fix uaudio(4) detection on Logitech Webcam C200/C210/C250/C270/C310/C500.Landry Breuil
Those devices have a broken AudioControl descriptor which advertises a bad value for bLength for the FEATURE_UNIT sub-descriptor, so add a quirk 'fixing' this bLength so that uaudio(4) attaches properly instead of bailing out with 'audio descriptors make no sense, error=4'. My C310 now properly attaches but doesnt seem to work right now, this is a different issue that will be worked on. Thanks to tb@, remi@, weerd@, Raf Czlonka, Base Pr1me, Jordan Geoghegan, Peter J. Philipp, Alfredo Vogel, James Hastings, Bruno Flueckiger, Remco & Alex Tsang for providing lsusb -v output for a large variety of Logitech Webcams. ok mpi@ ratchov@
2018-07-07regenLandry Breuil
2018-07-07Add ids for Logitech Webcam C250, also affected by the 'bogusLandry Breuil
FEATURE_UNIT bLength' issue. ok mpi@
2018-07-06Implement an API for establishing legacy PCI interrupts. This specificPatrick Wildt
establish function parses the device tree's interrupt map to discover the correct interrupt controller node and interrupt cells for the given PCI node. After retrieving that information we can do the same the normal FDT establish API already does. MSI interrupts are established in a different way as well. Instead of simply hooking up the interrupt handler and returning an MD cookie, we need to pass back information for the PCI controller to configure its interrupt correctly. For this, add another establish routine into the FDT-based interrupt API which looks up msi-controller nodes and calls their MSI-specific establish function if requested. ok kettenis@
2018-07-06Add bus_dmamap_sync(9) calls to bwfm(4) so that we make sure the dataPatrick Wildt
is synced properly before the CPU or the WiFi chip access the supplied memory. Makes PCIe-connected bwfm(4) work on ARM-based machines.
2018-07-06Move mbuf alignment for strict aligned architectures from the BCDCPatrick Wildt
specific receive path into the generic receive path, since PCIe supplied packets can be misaligned as well.
2018-07-06Since the function is supposed to return 1 if the window is free, wePatrick Wildt
must return 0 if we don't want that someone uses window 13. Remove erroneous for-loop. We simply want to check if it's a remappable window to disable the remap in that case. ok kettenis@
2018-07-06Fix efiboot not to panic when a serial which does not exist actuallyYASUOKA Masahiko
is specified as the console. Current implementation can't assume the given device is proved at the callback functions if the system has one serial device at least.
2018-07-06Split trap() into kerntrap() and usertrap(), with all the signal generationPhilip Guenther
in a compact block in the latter. ok deraadt@ mlarkin@
2018-07-06regenJonathan Matthew
2018-07-06add Broadcom NetXtreme-C/E devicesJonathan Matthew
2018-07-05fix comment: s/always send/always sent/Stuart Henderson
2018-07-05It was possible to leak the control mbuf in raw ip user requestAlexander Bluhm
with sendmsg(2) and MSG_OOB. Sync the code in udp, rip, and rip6_usrreq. Add an inp NULL check in rip6_usrreq for consistency. OK benno@ mpi@
2018-07-05Add acpipci(4), a driver that supports generic ECAM-compatible PCI hostMark Kettenis
bridges based on information provided by ACPI. ok mlarkin@
2018-07-05Do not leak memory and a fp reference when !root passes `allow_other'.Martin Pieuchot
Fix CID 1470236. ok helg@
2018-07-05regenMartin Pieuchot
2018-07-05Put back sendto(2) and sendmsg(2) under KERNEL_LOCK().Martin Pieuchot
malloc(9) is apparently not mpsafe as found the hardway by sthen@.
2018-07-05Serialize the sosplice taskq allocation. This prevents an unlikelyVisa Hankala
duplicate allocation that could happen in the future when each socket has a dedicated lock. Right now, the code path is serialized also by the NET_LOCK() (and the KERNEL_LOCK()). OK mpi@
2018-07-05Grab the KERNEL_LOCK() in kthread_create(9) to enable unlocked codeVisa Hankala
paths create kernel threads. This will be utilized by sosplice() for the taskq allocation. OK mpi@
2018-07-05backout r1.11 "Add retguard macros for kernel asm", ok deraadtStuart Henderson
after starting iked kernel enters ddb with: Stopped at aesni_ctr_enc+0xd8: int $3
2018-07-05RTM_BFD route messages are also a special case. suggested by claudio@,Sebastian Benoit
ok phessler@
2018-07-05not all route messages have a priority. Move the priority filter checkSebastian Benoit
where it belongs. Problem spotted by by remi@ ok sthen@ claudio@ krw@
2018-07-05Enable bwfm(4).Patrick Wildt
Requested by brad@ Tested by fcambus@ ok stsp@
2018-07-05Cast physical addresses to 64-bits so we can shift them by 32-bit onPatrick Wildt
32-bit platforms without the compiler complaining. In the end the value will turn out as 0 anyway. Allows enabling bwfm(4) on 32-bit platforms. ok stsp@
2018-07-05Add support for the VIA VX900 chipset in viapm(4).Frederic Cambus
OK kettenis@
2018-07-05forgot to commit vmmvar.h needed by previous two commits, thanks ccardenasMike Larkin
for noticing.
2018-07-05vmm(4): print guest vcpu mode and cpl in debug output if VM crashesMike Larkin
2018-07-05vmm(4): add some utility functions for checking vcpu cpl and modeMike Larkin
ok pd@, guenther@
2018-07-05Plug a vnode leak in namei(). If the file system is unmountedAlexander Bluhm
during name lookup, the directory vnode was not released. Add a vrele() to the error return path. NetBSD has added a vput() there after we imported the check. OK krw@ visa@