Is there any reason you can't defer your registration, so use
OSKextRequestResource but use the completion context rather than the
context that called your start routine to complete your startup?
I actually tried doing that ... but it's complicated.
The main issue here is kext ordering. Right or wrong, the filesystem
doesn't consist of one kext ... there are actually 15. I can't
take the blame for that one; that's just how it is organized.
Certain kext's need to load _and start_ before others. Right now
that's handled by the dependencies in the kext's Info.plist. But
when I tried running the kext initializations from the
OSKextRequestResource callback, I started getting kernel panics,
and I traced those down to the kext's trying to use uninitialized
resources. I suppose I could do some dependency tracking myself
... but that seems like a lot of work, again, for relatively little
gain.