Questions tagged [driverkit]

DriverKit is a device driver development framework for Apple's macOS and iPadOS operating systems, introduced with macOS 10.15 "Catalina" and later added to iPadOS in version 16.

General information

DriverKit is a device driver development framework for Apple's macOS operating system, introduced with macOS 10.15 "Catalina." It was later also added to iPadOS in version 16.

The DriverKit SDK is contained in Apple's Xcode IDE distribution (from version 11 onwards), and is used to build so-called "driver extensions" or "dext" which run in special privileged user space processes. These extensions are installed by apps using the system extensions mechanism.

The DriverKit SDK interfaces with the wider IOKit infrastructure, both in kernel and general user space.

Features

As of macOS 10.15, the following types of driver can be implemented using DriverKit:

As of macOS 10.15.4, the following types of driver can additionally be implemented:

macOS 11.3 added support for:

macOS 12 added APIs for:

iPadOS 16 supports:

  • USBDriverKit
  • PCIDriverKit (Thunderbolt)
  • AudioDriverKit

Relevant question topics

  • Questions about which driver technology is the correct one to for implementing a driver for a particular device. In addition to DriverKit, drivers on macOS may also be implemented using a kext (kernel extension) or as a regular user space process, depending on the underlying device technology (USB, PCI, Firewire, etc.), the type of device (storage, network, audio, display, etc.), and the macOS version(s) targeted.
  • Questions related to the process of building, code signing, and packaging dexts. There is some overlap with macos-system-extension tag, using both can be appropriate when talking about the installation/activation process and APIs.
  • Code-level questions for implementing DriverKit based drivers. Co-tag with hid, usb, pci, etc. as appropriate when discussing specific types of device.
  • Questions about interaction of DriverKit drivers with the rest of the system, be it kexts or user space (app) clients. This will typically overlap with the iokit tag.
102 questions
2
votes
1 answer

How should provisioning profile with com.apple.developer.driverkit.userclient-access look?

Our request to get the entitlement com.apple.developer.driverkit.userclient-access to access our Driverkit driver with bundle id com.example.driver for the app with bundle id com.example.app was processed but we are not sure that we got the correct…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
1 answer

ioreg list multiple dext

I have written a system extension using DriverKit and USBDriverKit that seems to work well (running with developer mode on, SIP off, ... still waiting for entitlements). When I plug my USB device and in terminal I type ioreg | grep…
ScottBraun
  • 61
  • 6
2
votes
2 answers

How to map memory in DriverKit using IOMemoryDescriptor::CreateMapping?

I am trying to learn more about DriverKit and memory management, and I read this question: How to allocate memory in a DriverKit system extension and map it to another process? And I would like to understand how to use…
2
votes
1 answer

How to programmatically uninstall App that install DriverKit system extension

I have an app that installs a DriverKit system extension when it launches. If I then drag this app to the Bin from /Applications then I am prompted about that the app also manages a system extension and that the system extension also will be…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
0 answers

How to save configuration from a DriverKit driver

I need to save some configuration from a DriverKit driver. I was reading How to save kext configuration between sessions and in this case it seems that the preferred way is to save the config from a user land app. Since DriverKit drivers are in user…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
1 answer

Does the DriverKit SDK support semaphores?

I can't find any functions like semaphore_create/semaphore_wait/semaphore_signal/semaphore_destroy in DriverKit headers. it's not supported in Driverkit, Are there alternatives?
Song
  • 97
  • 7
2
votes
1 answer

How to access the IOMemoryBufferDescriptor in CompleteAsyncIO, which is sent through AsyncIO on Interrupt EP

I am trying to send request using AsyncIO for Interrupt EP, for AsyncIO I have created IOMemoryBufferDescriptor, once IOMemoryBufferDescriptor, Create is success I used GetAddressRange and stored Address in ivars structure of dext. For this request…
david
  • 413
  • 5
  • 20
2
votes
1 answer

Can `new` and `delete` be used in a DriverKit driver?

DriverKit provides IONewZero and IOSafeDeleteNULL. Those does not call any constructor or destructor. Let's say that I would like to have some class in the ivars structure. The class does not need to inherit from OSObject nor IOService. How should…
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
1 answer

Create a Dext for legacy codeless kext without an app?

I am writing a DriverKit dext but I dont have any app. My original kext requires no app. In this case, how do I port the original codeless kext to new dext assuming I need an app to load the dext?
2
votes
1 answer

Not called at Start method of USB DriverKit

I am writing a DriverKit dext and can activate it using System Extension framework. I have the entitlements in place for usb which is com.apple.developer.driverkit is set to true com.apple.developer.driverkit.transport.usb has been added as…
Baab
  • 179
  • 6
2
votes
1 answer

Are callbacks serialised to a DriverKit driver?

I need to enqueue in and out requests on bulk, interrupt and isochronous endpoints at the same time. Can I expect that all callbacks from these requests to come one by one? Or can expect multiple callbacks at the same time?
tuple_cat
  • 1,165
  • 2
  • 7
  • 22
2
votes
0 answers

what is the DEXT class for ACM data driver for creating nub?

am new to kext/dext and trying to port kext drivers to dext for development purpose. In kext, for ACM data driver we created nub using IOModemSerialStreamSync class. In case of dext which class we will use for the same purpose?
bindu
  • 39
  • 1
1
vote
1 answer

Importing HID Driver Kit in Xcode

I am fairly new to Apple development. I have been working on a project where I need Mac to interface with an HID device (custom device). I have successfully communicated with the device using IOKit, Core Foundation and Driver Kit frameworks by…
1
vote
2 answers

Bundling a dext into an iOS .ipa with Xamarin

I have an project that takes a two-step process to build an iOS app. There's the native libraries and .dext built in XCode, and then those are linked to a Xamarin project that I use to finish building the app in C# on VisualStudio build. It's simple…
thoms
  • 55
  • 5
1
vote
0 answers

It is hard to configure the serial buffer when creating an IOUserSerial subclass

I am studying the IOUserSerial driverKit driver. My driver is able to detect a specify USB device. (The story that I don't use IOUserUSBSerial was depicted in this thread.) This post inspired me to create a practice project with a loopback serial…
Jason
  • 33
  • 3