summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
2018-05-23Enable bwfm(4).Patrick Wildt
ok stsp@
2018-05-23Map the second bwfm(4) BAR first. The bwfm(4) PCIe devices have twoPatrick Wildt
BARs, where the second one is much larger than the first. Both need to be properly aligned in the given extent. Since the first one is smaller, it will "unalign" the next free space and thus create a gap so that the second BAR cannot be properly aligned in the given space. By mapping the second BAR first, it will automatically have proper alignment. The first BAR, which has fewer alignment requirements, fits well after the initial allocation. Fixes bwfm(4) on APU 1. Debugged and solved by kettenis@
2018-05-23Remove unused pmap_steal_memory_implementation(). It doesn't actually workMark Kettenis
and implementing this interface only really makes sense for architectures that use a direct map. ok patrick@, visa@
2018-05-23Move CR4_DEFAULT to specialreg.h where the CR4_* values are definedPhilip Guenther
ok mlarkin@
2018-05-23Add back a local change to prevent interrupt handlers claiming anJonathan Gray
interrupt when it is shared by other devices. Fixes a regression reported by nigel@ where USB stopped working after the radeondrm update on a machine where ohci shared an interrupt with radeondrm.
2018-05-22Call acpi_attach_deps() for the child devices before attempting to powerMark Kettenis
them on. Prevents a panic on the AZW Z83-S that is somewhat buggy and checks whether the GPO3 controller is available and then pokes a pin on GPO2. It shouldn't do that but we should make sure all the devices that it depends on attach first anyway. ok patrick@
2018-05-22Turns out lucky me picked the Asus T100HA to implement the heuristic toMark Kettenis
rotate the inteldrm(4) framebuffer console. And judging from (somewhat) recent commits to Linux, this happens to be the only machine where the display needs to be rotated counterclockwise. So change the heuristic to rotate clockwise and add a quirk for the Asus T100HA. ok stsp@, mlarkin@, jsg@
2018-05-22kevent: correctly check that timeout's nanoseconds are on [0, 1000000000)cheloha
Validate the input with timespecfix before truncating to a timeval. timespecfix does not round, so we need to to it by hand after validation. FreeBSD and NetBSD check the input with this range, we ought to as well. Also add a regression test for this case. ok tb@
2018-05-22nanosleep: ensure tv_nsec input is on [0, 1000000000)cheloha
Instead of converting timespec -> timeval and truncating the input, check with timespecfix and use tstohz(9) for the tsleep. All other contemporary systems check this correctly. Also add a regression test for this case. ok tb@
2018-05-22Define CR0_DEFAULT with our default CR0_* flags for various .S files.Philip Guenther
Replace a hex constant with the correct CR0_* define in mptramp.S. Clean up lots and lots of whitespace glitches. no binary change. ok mlarkin@
2018-05-22Implement support for libfuse use_ino option. This returns the filehelg
system's ino for VOP_GETATTR(9) and VOP_READDIR(9) rather than the internally generated fuse ino. ok mpi@
2018-05-22Do not overwrite `table' in the non-translating case.Martin Pieuchot
This ensures the keyboard is using the expected scancode. From miod@, problem also noticed by Markus Hennecke, ok otto@
2018-05-22Prevent NET_LOCK() recursion when releasing the last `fp' reference.Martin Pieuchot
ok bluhm@, visa@
2018-05-22Factor out the common FPU handling from vcpu_run_{vmx,svm}() intoPhilip Guenther
vmm_fpu{restore,save}() ok mlarkin@
2018-05-22Delete antique sigdebug definitionsPhilip Guenther
ok kettenis@
2018-05-22acpithinkpad(4): add port replicator indicator sensorMike Larkin
Note: the sensor will report state UNKNOWN until at least one port replicator event (docked / undocked) is received. Diff from Tobias Tschinkowitz, thanks. ok stsp@. deraadt@ also ok'ed an earlier version of the diff
2018-05-21Make the way we print "not configured" lines for SDIO devices a bit nicer.Mark Kettenis
ok stsp@
2018-05-21All places that call carp_lsdrop() use the interface pointer already.Alexander Bluhm
It does not make sense to call if_get() again, just pass ifp as parameter. Move the IFT_CARP check into the function instead of doing it everywhere. Replace the inverted match variable logic with simple returns. OK mpi@ friehm@
2018-05-21Implement GPIO functionality.Mark Kettenis
2018-05-21Add ccpmic(4), a driver for the "Intel" Crystal Cove PMIC. This is actuallyMark Kettenis
a ROHM part (BD2613GW) and once more the datasheet is only available under NDA. Disabled for now until bugs in dwiic(4) are fixed.
2018-05-21The flush operation is optional so don't return ENOSYS if the FUSE file systemhelg
doesn't implement it. ok mpi@
2018-05-21Consistently suffix the pre-processed NVRAM binary that the bwfm(4)'sPatrick Wildt
firmware requires on SDIO-connected chips. From ketttenis@
2018-05-21Implement power management Operation Region support.Mark Kettenis
2018-05-21Put controllers and child devices in D0 by calling _PS0 when we attach theMark Kettenis
controller. Some BIOSen deliver them to us in D3. Override card detect if ACPI says that the child devices are non-removable. ok mlarkin@
2018-05-21Pass interrupt description along as well.Mark Kettenis
ok mlarkin@
2018-05-20Add tipmic(4), a driver for the "Intel" Dollar Cove TI PMIC. This is actuallyMark Kettenis
a TI part (SND9039) but the datasheet is only available under NDA because it contains "Intel proprietary information". Initial implementation handles the thermal sensors, providing data to acpi(4) which is used by acpitz(4). Power management functionality will be added later. Disabled for now until some bugs in dwiic(4) are fixed.
2018-05-20Stash the syscall number in tf_err so it can be reported by the SPL checkPhilip Guenther
ok mlarkin@ mpi@
2018-05-20Pass the acpi node corresponding to the i2c device down as the cookie.Mark Kettenis
ok mlarkin@
2018-05-20Wake up the acpi thread after scheduling a gpio event.Mark Kettenis
ok mpi@
2018-05-20Prevent race condition if file system is accessed before it ishelg
initialised. Rather than failing, requests are now queued. ok mpi@
2018-05-20Implement FBT_FLUSH. This is sent whenever a file descriptor is closed withhelg
VOP_CLOSE(9). The associated FUSE file handle is however not closed at this time and is instead closed on VOP_RELEASE(9) because that's the only time it's guaranteed to be no longer used. Directory handles are now only closed on VOP_RELEASE(9) for the same reason. ok mpi@
2018-05-19As long we have no per socket locking, we must grab either net lockAlexander Bluhm
or kernel lock when accessing a socket. For pf key sockets it is kernel lock, so add its protection in pfkey_sendup(). Fixes a kernel lock assertion panic reported by Peter J. Philipp. OK mpi@ visa@
2018-05-19Fix GenericSerialBus support by parsing ExtendedAccessField correctly.Mark Kettenis
ok mlarkin@
2018-05-19Introduce a tdb_reaper() function to prevent a use-after-free when aMartin Pieuchot
timeout is blocking on the NET_LOCK(). Issue reported by Harald Dunkel, ok visa@, bluhm@
2018-05-19Akin to the PCI attachment driver we can extract the chip's dmesg(8)Patrick Wildt
over the SDIO bus by accessing the correct addresses. This helped me find the RX FIFO overflow issue and might help find more issues where the chip's firmware complains about our wrongdoing.
2018-05-18regenMark Kettenis
2018-05-18Fix entry for Intel CM238 LPC.Mark Kettenis
ok mlarkin@
2018-05-18Revert previous commit; it break reading the RTC on my Cubox-i.Mark Kettenis
2018-05-18After reading the first frame, which we can do in two reads (softwarePatrick Wildt
plus hardware header, which tell us the length of the following data), we can issue full packet reads. The software header contains a field that informs us of the full length of the next frame that we can read, so we can do that in a single sitting. This brings us down from three SDIO read invocation to a single one per packet for a given RX stream.
2018-05-18This needs some #ifndef SMALL_KERNEL as well. Fixes RAMDISK_CD.Mark Kettenis
2018-05-18Use SCSI_NOSLEEP for management commands issued during attach.Jonathan Matthew
No real change because we'll never run out of ccbs that early. Noticed during review of the preceding changes. ok dlg@
2018-05-18Add bio(4) and sensors for mfii(4), based on code from mfi(4). Most of theJonathan Matthew
work was done by Naoki Fukaumi, some tweaks and adjustment to match the preceding changes by me. Tested on SAS2208, SAS3008, SAS3108, SAS3508. ok dlg@
2018-05-18Make mfii_mgmt() allocate and release a ccb to simplify the most common useJonathan Matthew
case. Based on a diff from Naoki Fukaumi. We decided to keep using scsi flags rather than switching to MFII_DATA_IN/OUT (as done in mfi(4)) so callers can include SCSI_NOSLEEP if required. ok dlg@
2018-05-18Add DPRINTF/DNPRINTF for debug output as in mfi(4) and convert existingJonathan Matthew
debug output to use them. ok dlg@
2018-05-18Use passthrough IO rather than MFA for management commands.Jonathan Matthew
Investigation by Naoki Fukaumi determined that this is necessary on some controllers and works on all of them. Tested on SAS2208, SAS3008, SAS3108, SAS3508. ok dlg@
2018-05-17The Broadcom FullMAC firmware has a few ways of doing flow control. OnePatrick Wildt
of those is a sequence number based window mechanism. Essentially every packet on the SDIO bus has a sequence number. The chip records which sequence number we used last and when it sends us replies, it tells us the maximum sequence number it accepts. This means we can calculate a window of sequence numbers that we are allowed to use. With this I no longer overflow the chip's RX fifo and can do stable network transfers.
2018-05-17Sprinkle some #ifndef SMALL_KERNEL such that RAMDISK kernels cuild again.Mark Kettenis
pointed out by stsp@
2018-05-17Implement GenericSerialBus OpRegion support.Mark Kettenis
ok mlarkin@
2018-05-17Let hvn_iff handle promisc mode activationMike Belopuhov
Tested by Daniel Wade, <Daniel2 ! Wade at ge ! com>, thanks!
2018-05-17Pass size argument to free(9).helg
ok mpi@