Hi @ssmith_c , I have the same issue. Did you manage to solve it?
The weird thing is that although the "app sandbox" entitlement is unnecessary for the DriverKit project, the Apple store review team constantly asks for it, and no documents describe how to do that.
Post
Replies
Boosts
Views
Activity
I agree with the necessity of that function "IOMemoryDescriptor::withAddress" in DriverKit
Hi,
I had similar struggles when I was porting my KEXT PCIE driver to DEXT driver. I especially had a hard time porting DMA functionality. The problem was DriverKit has some restrictions about memory management API. And I also couldn't useIOMemoryDescriptor::withAddressRange like @Benoit55 said and I didn't want to copy the user space buffer like @erich-areca so I came up with two solutions.
You can choose to allocate a buffer in DEXT address space using IOBufferMemoryDescriptor::Create and map it to the user space using functions IOConnectMapMemory64and CopyClientMemoryForTypefunctions
You can use the feature of IOConnectCallStructMethod that creates IOMemoryDescriptor when the structure size (or buffer size ) exceeds the size of a page ( 4096 byte ) and you may need to map that descriptor to DEXT space using CreateMapping instance method.
And rest is same as usual ( usingIODMACommand to prepare and create bus address segments )
I had a similar problem but I believe your problem is not related to IOConnectCallStructMethod because I've recently checked the size limit and works ok for my case. Do you still have a similar problem or is it solved ? You can try to allocate same space from heap and check if it is working ok.
Also thank you @marcin, I'm posting xref to that thread also.
I had the similar issue you can check my earlier post :
https://developer.apple.com/forums/thread/667454