I had developed a kernel extension(kext) by IOKit, but it will be deprecated in the future. So I want develope another driver use dext to replace kext using the DriverKit. But I don't find the executable solutions, like that I cannot find the some class to repalce IOMedia. When I intend to include IOKit in my code,I found the TARGET_OS_DRIVERKIT is 1. Can someone help me? Thanks a lot!
1 Answers
IOMedia
is a subclass of IOStorage
and part of the IOStorageFamily
. As of the macOS 11.2 SDK (Xcode 12.4) this has not yet been ported to DriverKit.
The SCSIControllerDriverKit API has been in beta since WWDC 2020. It didn't ship with the release versions of macOS 11.0.x-11.2. It's included in the (as of this writing) current betas of 11.3. Perhaps it will see general release with macOS 11.3. This is not a direct port of the storage stack; instead, it's essentially a port of the IOParallelSCSIController
KPI. This lets you implement a driver for, well, a SCSI controller. Such a driver can tell the OS about one or more SCSI devices, including block devices, and will start receiving SCSI commands from the system, which it is expected to forward to the underlying controller device. It does not allow you to implement "filter" storage drivers, or to issue SCSI commands to other devices in the system.

- 22,018
- 3
- 52
- 103
-
-
-
-
1@RhythmicFistman I've updated the answer with the latest situation. No public release version of macOS currently supports any block storage features in DriverKit. `SCSIControllerDriverKit` is in beta, but it's a fairly restrictive feature set and not equivalent to `IOStorageFamily`, the latter sits at a higher level. – pmdj Apr 08 '21 at 09:03
-
1@pmdj Do you think the SCSIControllerDriverKit just would be enough to have a dext based RAID driver? I read your last sentence "It does not allow you to implement "filter" storage drivers, or to issue SCSI commands to other devices in the system." sounds like it not yet possible. – Gabor Forgacs Apr 15 '21 at 15:14
-
@GaborForgacs Software RAID? No, that won't work with `SCSIControllerDriverKit`. Writing a driver for a hardware RAID controller should work. – pmdj Apr 15 '21 at 15:23
-