DriverKit driver: the plain C++ object its shell holds, making the devices the host asks for.
More...
|
| client* | client_create() override |
| | a client for an open of the driver itself: none where the platform gives the driver no access point of its own
|
| | driver(::DRIVER_OBJECT* wdm_driver, ::UNICODE_STRING* registry, const dxd::guid& guid= 0) |
| | driver(::IOService* service) |
| virtual os_result | ioctl(unsigned int ioctl, const void* in, size_t size_in, void* out, size_t size_out, size_t& size) |
| | driver-wide control I/O: the version, and the log mask - the input sets it, the output reads it back
|
| | operator const ::HANDLE() const |
| template<typename type_t> |
| os_result | query(const ::UNICODE_STRING& key, type_t& value) |
| template<typename key_t, typename type_t> |
| os_result | query(key_t* key, type_t& value) |
| os_result | remove() |
| os_result | set(const ::UNICODE_STRING& key, const ::GUID& value) |
| os_result | set(const ::UNICODE_STRING& key, const ::UNICODE_STRING& value, unsigned long type= REG_SZ) |
| os_result | set(const ::UNICODE_STRING& key, const char* value) |
| os_result | set(const ::UNICODE_STRING& key, const wchar_t* value) |
| os_result | set(const ::UNICODE_STRING& key, unsigned int value) |
| template<typename key_t, typename type_t> |
| os_result | set(key_t* key, const type_t& value) |
| device* | start(::IOService* shell, ::IOService* provider) |
| | a device's shell starts on its provider: the device of the pending request, or of the hardware the OS matched, launched
|
| void | stop(::IOService* shell) |
| | a device's shell stops: it leaves the driver's devices
|
| template<typename type_t> |
| unsigned long | type() |
| | ~driver() override |
| | the devices go with their driver: a shell stopping after it concludes its device alone
|
|
| virtual device* | create(::DEVICE_OBJECT* wdm_device, ::DEVICE_OBJECT* wdm_pdo, ::DEVICE_OBJECT* wdm_bus)= 0 |
| | device factory, on the OS's arrival of a device - the plain form's AddDevice, a form's own start
|
| os_result | create(const void* request, size_t size) |
| os_result | destroy(const char* id) |
| void | dispatch(::DRIVER_OBJECT* wdm_driver) |
| | installs the clients' dispatch and the removal over what the form's registration wrote
|
| | driver(::DRIVER_OBJECT* wdm_driver, ::UNICODE_STRING* registry, const dxd::guid& guid, form) |
| ::IOService* | find(const char* id) const |
| | the shell hosting the device of the given id
|
| virtual::NTSTATUS | forward(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | an IRP that is not a control client's: down the stack
|
| virtual os_result | started(device &) |
| | a device started, in every form: what a driver binds per device (dxd::power) binds here
|
|
| ::NTSTATUS | __cleanup(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | IRP_MJ_CLEANUP concludes the client, IRP_MJ_CLOSE deletes it and lets its device go.
|
| ::NTSTATUS | __close(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| ::NTSTATUS | __create(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | control opens carry no file name; a KS filter open carries its reference string
|
| ::NTSTATUS | __device_add(::DRIVER_OBJECT* wdm_driver, ::DEVICE_OBJECT* wdm_pdo) |
| | the plain form's arrival: an FDO on the PDO's stack and its device at once, which the resource filter and the start reach
|
| ::NTSTATUS | __forward(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| ::NTSTATUS | __ioctl(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | METHOD_BUFFERED: SystemBuffer carries input and output.
|
| ::NTSTATUS | __plain(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| | the plain form's PnP around the forms' own (__pnp) The start launches the device with its resources once the bus started it. A stop - a rebalance - retires the device as its clients see a removal: unplugged(), conclude(), removed; a successor takes its place, which the next start launches on the new resources, and the retired one goes with its last client. The resource requirements pass the device's filter on their way up, the capabilities state a surprise removal expected, the device object goes behind the remove.
|
| ::NTSTATUS | __pnp(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
| static void | __unload(::DRIVER_OBJECT* wdm_driver) |
| ::NTSTATUS | complete(::IRP* irp, os_result status, size_t information= 0) |
| static device *& | context(::DEVICE_OBJECT* wdm_device) |
| static driver& | context(::DRIVER_OBJECT* wdm_driver) |
| static device::client *& | context(::FILE_OBJECT* wdm_file) |
| static bool | ours(::FILE_OBJECT* wdm_file) |
| | a control open: no file name, the device it opened in FsContext2 - which a rebalance may have retired since
|
DriverKit driver: the plain C++ object its shell holds, making the devices the host asks for.
plain WDM driver: the driver object's dispatch of the control clients and of a device's removal
macOS has no software device API, so the host's dx::ioctl::driver::create and destroy reach the driver's own client: create() starts a device shell (dxd_device) on the driver's shell with IOService::Create, whose Start takes the request made at that moment (start()), destroy() terminates it. A dext whose devices the OS matches on their hardware has no driver shell: every device shell owns a driver of its own, which makes its device as it starts.
Its context hangs at the DRIVER_OBJECT, a device's at extension in the device extension - a driver form owning the extension's head (PortCls) states where. Control opens carry no file name: they get a client in FsContext and the device in FsContext2, which identifies them; every other IRP goes to forward() - down the stack here, into its own dispatch in a form owning one (PortCls). The plain form is the public constructor: it makes its devices on AddDevice and starts and filters them itself (__plain). A form constructs through form, registers with the OS and installs this dispatch after (dispatch()), since a registration like PcInitializeAdapterDriver writes the table itself.
| ::NTSTATUS dxd::platform::driver::__plain(::DEVICE_OBJECT* wdm_device, ::IRP* irp) |
|
inlinestaticprotected |
the plain form's PnP around the forms' own (__pnp) The start launches the device with its resources once the bus started it. A stop - a rebalance - retires the device as its clients see a removal: unplugged(), conclude(), removed; a successor takes its place, which the next start launches on the new resources, and the retired one goes with its last client. The resource requirements pass the device's filter on their way up, the capabilities state a surprise removal expected, the device object goes behind the remove.