summaryrefslogtreecommitdiff
path: root/sys/dev/ic
AgeCommit message (Collapse)Author
2024-10-08Add the BUS_DMA_64BIT flag to bus_dmamem_alloc(9) calls since NVMe devicesMark Kettenis
can do 64-bit DMA. ok mpi@, mlarkin@
2024-10-08set activate for ufshci_acpi and ufshci_fdtJonathan Gray
tested by mglocker@ with pci, acpi and fdt attachments ok mglocker@ deraadt@
2024-10-06remove unused atw_beacon_len_adjust variableJonathan Gray
2024-10-04Increase psp(4) timeouts.Alexander Bluhm
On EPYC 9124 psp(4) seems to need more to time to respond. Otherwise it will not attach. Increase timeouts for both polling during autoconf and interrupt during normal operation. from hshoexer@ OK mlarkin@
2024-09-20remove unneeded semicolons; checked by millert@Jonathan Gray
2024-09-13Add sensors based on information in the SMART/health log page,Jonathan Matthew
showing overall device health and temperature. tested by many (a while ago) tweaks from gkoehler@ kettenis@ dv@ ok kettenis@ jca@ (earlier version), dlg@
2024-09-04wrap long linesJonathan Gray
2024-09-04Fix some spelling.Marcus Glocker
Input and ok jmc@, jsg@
2024-09-04remove unused timeout from softcJonathan Gray
2024-09-04make psp attach to ccp as a different driverJonathan Gray
'fine with me' hshoexer, ok bluhm@
2024-09-03move psp functions to psp.c and remove the ifdefsJonathan Gray
ok bluhm@ hshoexer@
2024-09-01For AMD SEV provide ioctl(2) in cpp(4) to shutdown guest.Alexander Bluhm
To shutdown a SEV-enabled guest, first deactivate the guest context in ccp(4), then decommission the guest context. Combine these two operations in a single ioctl to simplify guest shutdown for vmd(8). As this ioctl does not directly map to a single ccp command, use a high number for the ioctl. More ioctls like this one will come. from hshoexer@; OK mlarkin@
2024-09-01Pledge "vmm" for ccp(4) ioctl(2).Alexander Bluhm
Limit ccp ioctls to processes that pledge vmm. Specific psp device ioctls for AMD SEV will allowed for vmd(8). from hshoexer@; input deraadt@ jsg@
2024-09-01spelling; checked by jmc@, ok miod@ mglocker@Jonathan Gray
2024-09-01spelling; checked by jmc@, ok miod@ mglocker@ krw@Jonathan Gray
2024-08-31net drivers may have mii children, but mii layer has no _activateTheo de Raadt
functions. similar operations are done via driver xx_stop/init functions calling mii_ subfunctions directly at the right moments in time, and are not anticipated to ever need the activate mechanism. so for now, delete all the config_activate_children() here ok kettenis
2024-08-30SpellingMarcus Glocker
2024-08-20Update handling of transfer rings.Patrick Wildt
2024-08-20Introduce and update HAL SRNG ops.Patrick Wildt
2024-08-20add (), | has higher precedence than ?:Jonathan Gray
ok mglocker@
2024-08-19avoid NULL deref if malloc failsJonathan Gray
ok stsp@
2024-08-18plug a memory leak in qwx(4) by freeing vifs when the interface goes downStefan Sperling
2024-08-17Checkpoint of work-in-progress attempt to support the FireGL-UX board. ThisMiod Vallat
particular sti(4) device relies upon undocumented callbacks from the kernel, and will default to iodc code otherwise. The device now initializes correctly, but writes to the frame buffer memory freeze the system due to bad interaction with the ROM even though it is disabled at the PCI level - unfortunately I'm currently out of hair to pull at the moment to make any progress on this. No functional change intended for other sti(4) devices.
2024-08-17enable qwx(4) ext irqs earlier for suspend/resumeStefan Sperling
Enable ext IRQs like the Linux driver does it, not later. I did this differently due to problems in early development that have since been fixed. Fixes an interrupt storm during resume which prevents things like key installation from working, leaving the network link dead.
2024-08-17whitespaceTheo de Raadt
2024-08-17The dwiic_init() routine is used at startup to read various chipTheo de Raadt
registers, make some decisions, and then program other registers. After a resume, it is pointless, and potentially incorrect to read such registers again, which a BIOS or something may not have initialized, and we are better off using the remembered soft-state to init cleanly. So craft a custom block of chip restoration, and do it while the chip is stopped hard. ok kettenis mlarkin
2024-08-17dwiic_activate did not inform sub-devices with config_activate_children()Theo de Raadt
calls from the correct places, so their DVACT_QUIESCE and DVACT_WAKEUP were incorrect, and led to those sub-drivers (ihidev and imt) racing against dwiic hardware re-initialization. ok kettenis mlarkin
2024-08-17dwiic resume is almost exclusively a "hardware state restore", andTheo de Raadt
not a "restart transaction", so the job should get done at DVACT_RESUME time. ok kettenis mlarkin
2024-08-16whitespaceTheo de Raadt
2024-08-16delete disabled ACPI-related code in here, this power management isTheo de Raadt
done at a different level, and nothing needs to be done here ok kettenis
2024-08-16Align more register addresses and data structures with ath12k.Patrick Wildt
2024-08-15Further minor cleanup for improved readability, with the major change thatPatrick Wildt
FW now seems to come up after providing regdb parsed out of the board file.
2024-08-15Initial patchset on top of the qwx(4) to adjust for ath12k. Still notPatrick Wildt
working yet, but it's better to continue polishing this in-tree.
2024-08-14Introduce qwz(4), a work-in-progress port of the Linux ath12k driver.Patrick Wildt
This driver is not working yet, it's a copy of qwx(4) which bit-by-bit will be adjusted to work on the newer generation of chips. Even though this is only a minor bump over the previous generation, the changes are large enough that bringup, debugging and long-term maintenance would suffer trying to squash them into a single driver. This can be reconsidered once we have reached a stable state.
2024-08-13For AMD SEV use correct command mask in ccp(4) driver.Alexander Bluhm
According to AMD SEV API specification, the mask for command ID is supposed to be of length 10 (Bits [25:16]), rather than length 6. This ensures that all commands are properly processed by the PSP. from Aaron Debebe; OK hshoexer@
2024-08-12try harder to leave a gap on the tx ring.David Gwynne
i think before this change we could overwrite entries on the ring, which can confuse the chip and the tx completion code. i think. it's funny how much a comparison hurts my brain. ok patrick@ tested by and ok kevlo@
2024-07-13Backout previous change related to not freeing memory on suspend.Dave Voutila
It broke resume from hibernate. :(
2024-07-12Simplify nvme suspend/resume by resetting queues and not deallocatingDave Voutila
memory. This removes memory allocation from the resume-side of device activation. ok deraadt@
2024-07-08Don't check op_q_alloc for non-NULL before invoking op_q_free.Kenneth R Westerback
Check op_q_free for non-NULL instead. Neither are currently set to non-NULL anywhere. ok jmatthew@
2024-06-30Use howmany() to calculate how many prpl entries are needed to describe aKenneth R Westerback
hibernate i/o. Use of howmany() suggested by jmatthew@, ok jmatthew@
2024-06-27Clear interrupt before we process the request as specified in theMarcus Glocker
documentation.
2024-06-26Remove unnecessary structure declaration.ASOU Masato
ok jsg@
2024-06-26return type on a dedicated line when declaring functionsJonathan Gray
ok mglocker@
2024-06-22remove space between function names and argument listJonathan Gray
2024-06-18remove prototypes with no matching functionJonathan Gray
2024-06-15To my current knowledge, UFSHCI has a single target design. Reflect thisMarcus Glocker
in the code, and remove some XXXs by that. No functional changes.
2024-06-14We have an 'handled' variable for the interrupt handler, so use it also forMarcus Glocker
the return values.
2024-06-14Improve return value handling of functions.Marcus Glocker
no objections from deraadt@
2024-06-13Avoid ccp error message if SEV-ES is missing.Alexander Bluhm
PSP is optional to ccp(4). Thus if PSP attachment fails (e.g. interrupt can not be set up), do not unmap IO space. It will still be needed by ccp(4). Nonetheless, disestablish interrupt handler if PSP attachment fails. Another tweak: If PSP can not be initialized, there's no need to actually flush caches (wbinvd) on all CPUs. Cleanup dmesg output and make it more precise. from hshoexer@; reported and tested by Hrvoje Popovski
2024-06-12Add support for the AMD Platform Security Processor (PSP) to ccp(4).Alexander Bluhm
Several commands for basic platform initialization and launch of SEV/SEV-ES enabled guests are implemented. These can be used by e.g. vmd(8) later. from hshoexer@; OK mlarkin@