|
dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
|
DriverKit PCI device: its nub opened with bus mastering and memory space, its memory and interrupts. More...
#include <dxd_pci_device.h>
Classes | |
| class | scatter_gather |
| a memory's device addresses below 1<< limit_t, from initialize() to free(): mapped by the device's IOMMU (DART), in at most the 32 runs one preparation hands More... | |
Public Member Functions | |
| client* | client_create() override |
| a client for an open: the platform's device makes the platform's client | |
| void | identify(uint64_t id) |
| the OS's identity of the hardware as the puid, until launch() states a persistent one | |
| os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) override |
| template<typename transition_t> | |
| os_result | powered(bool on, transition_t&& transition) |
| a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone | |
| template<typename reference_t> | |
| int | release(reference_t& reference) |
| template<typename desc_t> | |
| os_result | requested(desc_t& desc) const |
| the desc the host created this device with | |
| void | retain() |
| void | try_conclude() |
| conclude()s if launched | |
| os_result | try_launch() |
| launch()es unless launched, a failure concluded | |
Public Attributes | |
| bool | launched{} |
| const char* | model{} |
| the model's name alike | |
| bool | on{true} |
| char | puid [0x80] {} |
| persistent UID, system unique: the platform takes it from the OS's identity of the device | |
| atomic<int> | references{} |
| os_result | status{not_initialized} |
| const char* | vendor{} |
| the vendor's name the desc states, published with the puid for user mode to match by | |
Protected Member Functions | |
| client* | client_create() override |
| a client for an open: the platform's device makes the platform's client | |
| void | conclude() override |
| remove hook, the last word to the hardware | |
| void | conclude() override |
| no interrupt in flight reaches the device once its DPCs are flushed | |
| void | filter(::IO_RESOURCE_REQUIREMENTS_LIST& list) override |
| a memory requirement of length 0 the bus states is dropped: no window answers it | |
| virtual bool | irq(unsigned int, int64_t) |
| an interrupt of the vector, on the device's queue: claimed, its source quiet, isr() follows | |
| virtual bool | irq(unsigned int, int64_t) |
| an interrupt of the vector, at its level: claimed, its source quiet, isr() follows in the vector's DPC | |
| os_result | irq_enable(bool enable= true) |
| os_result | irq_enable(bool enable= true) |
| the vectors connected or disconnected, at passive level | |
| virtual void | isr(unsigned int) |
| virtual void | isr(unsigned int) |
| os_result | launch() override |
| start hook, called before any client can reach the device | |
| os_result | launch() override |
| start hook, called before any client can reach the device | |
| uint32_t | read32(uint8_t bar, uint64_t offset) const |
| a BAR the nub does not reach reads as a device gone from the bus, a write to it goes nowhere: conclude() takes any launch() | |
| uint32_t | read32(uint8_t bar, uint64_t offset) const |
| os_result | sleep() override |
| the sources off while the device sleeps - it reads all ones meanwhile -, on again behind its wake where they were | |
| os_result | sleep() override |
| the interrupts off while the device sleeps - it reads all ones meanwhile -, connected again behind its wake where they were | |
| os_result | start(const ::CM_RESOURCE_LIST* raw, const ::CM_RESOURCE_LIST* translated, const ::GUID& guid) |
| the start: launch() with the resources at hand, then the control clients' interface | |
| void | unplugged() override |
| the interrupts go at the surprise removal, the BARs stay mapped until conclude(): the device reads all ones meanwhile | |
| os_result | wake() override |
| power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude() | |
| os_result | wake() override |
| power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude() | |
| void | write32(uint8_t bar, uint64_t offset, uint32_t value) const |
| void | write32(uint8_t bar, uint64_t offset, uint32_t value) const |
Static Protected Member Functions | |
| static constexpr bool | removed(uint32_t value) |
| a register read of a device gone from the bus | |
| static constexpr bool | removed(uint32_t value) |
| a register read of a device gone from the bus | |
Protected Attributes | |
| ::IOPCIDevice* | pci{} |
| ::IOService* | provider{} |
| the driver's shell it stands on | |
| bool | removed{} |
| the device vanished: the stack below no longer answers | |
| ::IOService* | service |
| the shell hosting this device | |
| struct dxd::platform::device:: { ... } | wdm |
Friends | |
| class | ::dxd_interrupt |
DriverKit PCI device: its nub opened with bus mastering and memory space, its memory and interrupts.
WDM PCI device: its BARs mapped from the start's resources (pci::bars), its interrupts.
irq() and isr() run per vector on the device's own serial queue, isr() where irq() claims the interrupt - a dext has no primary interrupt level, so the two are the KMDF device's pair in one place; the vectors are MSI where the nub grants them, the legacy line otherwise, and launch with their sources disabled (irq_enable()). read32()/write32() reach a BAR by its index; a device gone from the bus reads all ones (removed()). PCI devices
irq() runs at the interrupt's level, isr() in the vector's DPC where irq() claims the interrupt; the vectors are MSI where the inf grants them, the legacy line otherwise, connected by irq_enable(). The bus's memory requirements of length 0 are dropped ahead of the start. PCI devices
|
inlineoverridevirtualinherited |
a client for an open: the platform's device makes the platform's client
Implements dxd::device.
|
inlineoverrideprotectedvirtualinherited |
a client for an open: the platform's device makes the platform's client
Implements dxd::device.
|
inlineoverrideprotectedvirtual |
remove hook, the last word to the hardware
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
no interrupt in flight reaches the device once its DPCs are flushed
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
a memory requirement of length 0 the bus states is dropped: no window answers it
Reimplemented from dxd::platform::device.
|
inlineinherited |
the OS's identity of the hardware as the puid, until launch() states a persistent one
|
inlineoverridevirtualinherited |
dx::ioctl::device::reenumerate: the shell of a device the OS matched on its hardware terminates, the OS matches the hardware anew - a dext a replacement activated takes it, kernelmanagerd leaving the replaced one to its devices
Reimplemented from dxd::device.
Reimplemented in dxd::usb::device< super_device_t >.
|
inlineprotectedvirtual |
an interrupt of the vector, on the device's queue: claimed, its source quiet, isr() follows
Reimplemented in dxd::firewire::controller< super_device_t >.
|
inlineprotectedvirtual |
an interrupt of the vector, at its level: claimed, its source quiet, isr() follows in the vector's DPC
Reimplemented in dxd::firewire::controller< super_device_t >.
|
inlineprotected |
|
inlineprotected |
the vectors connected or disconnected, at passive level
|
inlineprotectedvirtual |
Reimplemented in dxd::firewire::controller< super_device_t >.
|
inlineprotectedvirtual |
Reimplemented in dxd::firewire::controller< super_device_t >.
|
inlineoverrideprotectedvirtual |
start hook, called before any client can reach the device
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
start hook, called before any client can reach the device
Reimplemented from dxd::device.
|
inlineinherited |
a power transition, as dxd::power binds the OS's: sleep() ahead of leaving the working state, the transition, wake() once in it - a change of a launched device alone
a BAR the nub does not reach reads as a device gone from the bus, a write to it goes nowhere: conclude() takes any launch()
|
inlineinherited |
|
inlinestaticconstexprprotected |
a register read of a device gone from the bus
|
inlinestaticconstexprprotected |
a register read of a device gone from the bus
|
inlineinherited |
the desc the host created this device with
|
inlineinherited |
|
inlineoverrideprotectedvirtual |
the sources off while the device sleeps - it reads all ones meanwhile -, on again behind its wake where they were
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
the interrupts off while the device sleeps - it reads all ones meanwhile -, connected again behind its wake where they were
Reimplemented from dxd::device.
|
inlineprotectedinherited |
the start: launch() with the resources at hand, then the control clients' interface
|
inlineinherited |
conclude()s if launched
|
inlineinherited |
launch()es unless launched, a failure concluded
|
inlineoverrideprotectedvirtual |
the interrupts go at the surprise removal, the BARs stay mapped until conclude(): the device reads all ones meanwhile
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude()
Reimplemented from dxd::device.
|
inlineoverrideprotectedvirtual |
power hooks: a launched device comes back to the working state, and leaves it - its start and its removal are launch() and conclude()
Reimplemented from dxd::device.
|
friend |
|
inherited |
|
inherited |
the model's name alike
|
inherited |
in the working state
|
protected |
|
protectedinherited |
the driver's shell it stands on
|
inherited |
persistent UID, system unique: the platform takes it from the OS's identity of the device
|
inherited |
|
protectedinherited |
the device vanished: the stack below no longer answers
|
protectedinherited |
the shell hosting this device
|
inherited |
|
inherited |
the vendor's name the desc states, published with the puid for user mode to match by
| struct { ... } dxd::platform::device::wdm |