Hi there,
I'm developing an OS X kernel extension (kext) that will be used as an I/O Kit driver. This driver, however, will be strictly "virtual"; it will not interface with any hardware.
OS X keeps a catalog (I/O Catalog) of all the drivers that are loaded into the kernel. It also keeps a registry (I/O Registry) containing the I/O Catalog drivers that have matched with a hardware device and that are currently controlling the hardware.
Since my driver is not dependent on hardware and does not "match", it is only loaded into the I/O Catalog and not registered with the I/O Registry. This causes a problem, because the API to obtain I/O driver objects is limited to the drivers that are registered in the I/O Registry and does not access the objects in the I/O Catalog. I've tried matching to my driver using the recommended APIs, however, as I mentioned before, these APIs do not expose the I/O Catalog entries.
My ultimate goal is to obtain a reference to my driver in order to transfer in data with the "setProperties" method. If all else fails, I can use a combination of syscall, copyin and copyout to transfer the data in and out of the driver, but I'm not interested in that solution at the moment.
In short: Is there any way to obtain a reference to a driver that is in the I/O Catalog but not in the I/O Registry?
Update: To observe what I mean, look at the following two screen shots of IORegistryExplorer:
The registered driver is easily accessed through the API, but the unregistered driver will not match using IOServiceGetMatchingServices(...). How do I get a reference to a loaded driver that is not registered?
For more information, check out: