PCIDriverKit

RSS for tag

Develop device drivers for Peripheral Component Interconnect accessories.

Posts under PCIDriverKit tag

75 Posts

Post

Replies

Boosts

Views

Activity

Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Hi, I'm developing my own PCIe device driver, the log shows error message below when driver executing. 2023-07-31 13:43:47.031012+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] com.asix.dext.pciedevice: Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci 2023-07-31 13:43:47.031048+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] Disallowing: com.asix.dext.pciedevice 2023-07-31 13:43:47.062775+0800 0x1d436e Error 0x0 103 0 kernelmanagerd: Error occurred while handling request "DextLaunch(arguments: Optional(["Check In Token": 12087, "kOSBundleDextUniqueIdentifier": <04642bc8 90788071 c2a02259 c624ba81 3bebbf55 f9f2db7e f9fbbdd5 1f2ed99d>, "Driver Extension Server Tag": 4294982732, "DriverKit Reslide Shared Cache": 0, "Driver Extension Server Name": com.asix.dext.pciedevice, "CFBundleIdentifier": com.asix.dext.pciedevice]))": Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error" **How to match device's PID & VID to driver and make it work successfully? Please help me, Thanks** errorcode.txt
2
0
1.8k
Nov ’23
Missing API function in DriverKit for canceling timer event source
Hi, I'm working on a project that requires porting my KEXT driver to DriverKit system extension ( DEXT ). I've managed to re-write most of functions using DriverKit but I couldn't found a function for cancelling a scheduled timer. What I try to make is waiting for an interrupt with a timeout period. And if the interrupt arrives in certain time period I need to cancel timeout timer and send async response to the user app. I'm also open to the suggestions. Here is the code fragment for IOKit that I need to convert to DriverKit // ... initialization code fragment ( error handling parts deleted ) m_timeout_timer = IOTimerEventSource::timerEventSource(this, timer_fired_pc_recv); IOReturn result = m_workLoop->addEventSource(timer); // ... starting the timeout counter m_timeout_timer->setTimeoutMS(timeout_in_ms); // ... some time later (cancel part) m_timeout_timer->cancelTimeout(); And equivalent code in DriverKit // ... initialization code fragment ( error handling parts deleted ) ret = IOTimerDispatchSource::Create(ivars->default_dispatch_queue, &ivars->timer_dispatchSource); // starting timer timer_dispatchSource->WakeAtTime(kIOTimerClockMonotonicRaw, currentTime + fiveSecondsInNanoSeconds, twoSecondsInNanoSeconds); // missing part here I did see the member method Cancel in IOTimerDispatchSource but it is kind of termination to the lifetime of IOTimerDispatchSource
0
0
837
Oct ’23
PCI dext: scatter-gather DMA to application buffer
Hello, I am porting a PCI driver written with IOKit to the new PCIDriverKit framework. I am able to perform DMA with a contiguous buffer allocated inside the dext (with IOBufferMemoryDescriptor::Create). But I would also like to perform DMA to and from a buffer allocated by an application. What I exactly want to do is: Allocate an aligned buffer in the app (with e.g. posix_memalign) Send the pointer to this buffer to the dext In the dext, retrieve the list of pages descriptors to be able to perform DMA without copy into (or from) this buffer. In IOKit, we can use methods such IOMemoryDescriptor::withAddressRange and IODMACommand::gen64IOVMSegments to map and retrieve the scatter gather list but I cannot find any information on how to do this in a dext with the PCIDriverKit framework. Can anybody help me on how to do that?
4
0
2.9k
Oct ’23
Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
I have applied for DriverKit for PCI transport entitlements. Selected Additional Capabilities DriverKit PCI (PrimaryMatch) for the app ID, then made a profile and download. Check the profile, which also includes com. apple. developer. driverkit. transport. pci. But when install this driverkit, log show the error:Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
0
0
714
Aug ’23
Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Hi all, I got the entiltlements for the DriverKit PCI (primary match). so I added it to my driver app ID. so, I can show the ~~transport.pci entitlement item on my provision profile. However, macOS system still block the my driver, and log show the " Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci"
2
0
1.6k
Jul ’23
How to assign dma to pci and get data
Hi, I am working in DriverKit(dext) environment with PCIDriverKit. How to assign dma to pci device? How to know the address to get the data recorded in the memory using dma in the pci device? There are some information related to kext, but, i'm looking for information or sample code for dext. Any little information would be helpful.
0
0
902
May ’23
getDeviceMemoryWithIndex alternative in PCIDriverKit for DEXT
Hi, We have PCI storage device for which we use Kernel Driver. In kernel driver development we use getDeviceMemoryWithIndex to get IODeviceMemory and then we map it using IODeviceMemory->map then we fetch virtual memory using IOMemoryMap->getVirtualAddress. So my query is what's alternative for this in PCIDriverKit for developing DEXT. I found _CopyDeviceMemoryWithIndex api which seems similar to getDeviceMemoryWithIndex. But when I used this api then this is failing with error: 0xe00002cd (Device Not Open.) I'm doubting this failure because of IOPCIDevice->Open failure for which I have already created another thread [https://developer.apple.com/forums/thread/661711] to discuss this issue. There is no sample code available so I'm just following WWDC2020 presentation for Modernize PCI and SCSI drivers with DriverKit. My driver is loading and unloading on device connect/disconnect and able to fetch VID and DEVID from PCI registers. I'm using IOPCIDevice as provider and IOPCIMatch for driver matching. Any help or suggestion is really appreciated. Thanks
2
0
2k
May ’23
PCI transport entitlement / capability
We're invited to write PCI drivers for iPad, but there's no capability for PCI Driver Kit in Xcode and a com.apple.developer.driverkit.transport.pci key in your entitlements does not find its way into your embedded.provisionprofile with Automatically Manage Signing nor can you manually add it in the appID portal, because it's not there. Huh?
13
0
4.6k
Apr ’23
inaudible output after CoreAudio device initialises+limited number of controls per engine?
hi everyone, so i am wondering what else i must do after my device successfully completes the CoreAudio initialisation process? it seems ready to roll: but when i play something in itunes i don't hear anything. the slider moves as you'd expect. i compared some properties of the device to the headphone jack and noticed the latter maps to an output device (my headphones). in the case of this sound card, it's just a jack. is there something simple i'm missing? lastly, i noticed that the engine is limited to approximately 8 controls. i couldn't add the full 8 channels plus an 'allchannels' volume control, as you can see on the right panel of the second image. this is not due to a programming error. is it possible that the designers were stingy and used exactly 8 bits to describe the number of each kind of control on an engine (i.e. 8 toggles/8 selectors/8level controls)?
1
0
1.8k
Jan ’23
Why are the two different about M1 and Intel MacBook
Dear all we try to test a capture card in M1 and Intel Mac book . we find some different . insert thunderbolt device(pcie device). open OBS and open the video. Unplug the device without close the OBS(APP). re-plug the device . we find M1 can't find the Thunderbolt drive . thunderbolt port are block, we had to restart the pc and fix the problem . but intel Mac book have not the problem . if I close these app, and then Unplug the device , then we re-plug it , we find M1 And Intel MAC book can work. we summary it M1 have a thunderbolt block problem when app run to unplug the thunderbolt . Intel Mac have not the problem . I want to know how to fix the problem.
1
0
1.2k
Sep ’22
Kernel Panic triggered by PCIe DriverKit Extension
My company has been developing a DriverKit Extension for our ThunderBolt attached devices. The dext is part of a set of components developed to replace a complex kext. Our testing has gone well on Intel based machines, but I seem to be able to cause kernel panics on my M1 Mac Mini when running some tests from an application that sends commands to the dext. The crashes aren't immediate; they happen apparently when the device wakes from sleeping. If I don't enable some particular capabilities on the devices the code works fine. Unfortunately they are LLC crashes and I have no way to debug them. Has anyone dealt with something like this? panic(cpu 6 caller 0xfffffe001f038b94): "LLC Bus error from cpu2: FAR=0x600102068 LLC_ERR_STS/ADR/INF=0x11000ffc00000080/0x4300040600102068/0x5 addr=0x600102068 cmd=0x18(acc_cifl2c_cmd_rd_ld)" @AppleFireStormErrorHandler.cpp:424 Debugger message: panic Memory ID: 0x6 OS release type: User OS version: 21E258 Kernel version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 Fileset Kernelcache UUID: E642C8E63C1D004A6B6639342D386514 Kernel UUID: 79A2DE0A-5FBB-32B8-B226-9D5D3F5C25A4 iBoot version: iBoot-7459.101.3 secure boot?: YES Paniclog version: 13 KernelCache slide: 0x0000000016758000 KernelCache base: 0xfffffe001d75c000 Kernel slide: 0x0000000016ef8000 Kernel text base: 0xfffffe001defc000 Kernel text exec slide: 0x0000000016fe0000 Kernel text exec base: 0xfffffe001dfe4000
2
0
1.8k
Sep ’22
Impossible to develop DriverKit drivers for iPadOS
There is currently no way to "Bring your driver to iPad with DriverKit" because it's impossible to develop a driver because developers can neither deploy to the device nor run there because there is no way to procure development provisioning profiles with the required entitlements for actual hardware (USB, PCI). I bought an M1 iPad just to test this alleged new capability and the only thing it's good for so far is theoretically transferring files quickly or attaching some kind of ethernet dongle. My 1 month no-questions-asked returns window is going to close soon! FB10152280 FB10244398 FB10244627 FB10160665 FB10152361 FB10160793 FB10152210 FB10160567 FB10244046 FB10427776
0
1
1.6k
Jun ’22
Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Hi, I'm developing my own PCIe device driver, the log shows error message below when driver executing. 2023-07-31 13:43:47.031012+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] com.asix.dext.pciedevice: Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci 2023-07-31 13:43:47.031048+0800 0x1d41ce Error 0x0 12158 0 taskgated-helper: (ConfigurationProfiles) [com.apple.ManagedClient:ProvisioningProfiles] Disallowing: com.asix.dext.pciedevice 2023-07-31 13:43:47.062775+0800 0x1d436e Error 0x0 103 0 kernelmanagerd: Error occurred while handling request "DextLaunch(arguments: Optional(["Check In Token": 12087, "kOSBundleDextUniqueIdentifier": <04642bc8 90788071 c2a02259 c624ba81 3bebbf55 f9f2db7e f9fbbdd5 1f2ed99d>, "Driver Extension Server Tag": 4294982732, "DriverKit Reslide Shared Cache": 0, "Driver Extension Server Name": com.asix.dext.pciedevice, "CFBundleIdentifier": com.asix.dext.pciedevice]))": Error Domain=NSPOSIXErrorDomain Code=8 "Exec format error" **How to match device's PID & VID to driver and make it work successfully? Please help me, Thanks** errorcode.txt
Replies
2
Boosts
0
Views
1.8k
Activity
Nov ’23
Missing API function in DriverKit for canceling timer event source
Hi, I'm working on a project that requires porting my KEXT driver to DriverKit system extension ( DEXT ). I've managed to re-write most of functions using DriverKit but I couldn't found a function for cancelling a scheduled timer. What I try to make is waiting for an interrupt with a timeout period. And if the interrupt arrives in certain time period I need to cancel timeout timer and send async response to the user app. I'm also open to the suggestions. Here is the code fragment for IOKit that I need to convert to DriverKit // ... initialization code fragment ( error handling parts deleted ) m_timeout_timer = IOTimerEventSource::timerEventSource(this, timer_fired_pc_recv); IOReturn result = m_workLoop->addEventSource(timer); // ... starting the timeout counter m_timeout_timer->setTimeoutMS(timeout_in_ms); // ... some time later (cancel part) m_timeout_timer->cancelTimeout(); And equivalent code in DriverKit // ... initialization code fragment ( error handling parts deleted ) ret = IOTimerDispatchSource::Create(ivars->default_dispatch_queue, &ivars->timer_dispatchSource); // starting timer timer_dispatchSource->WakeAtTime(kIOTimerClockMonotonicRaw, currentTime + fiveSecondsInNanoSeconds, twoSecondsInNanoSeconds); // missing part here I did see the member method Cancel in IOTimerDispatchSource but it is kind of termination to the lifetime of IOTimerDispatchSource
Replies
0
Boosts
0
Views
837
Activity
Oct ’23
PCI dext: scatter-gather DMA to application buffer
Hello, I am porting a PCI driver written with IOKit to the new PCIDriverKit framework. I am able to perform DMA with a contiguous buffer allocated inside the dext (with IOBufferMemoryDescriptor::Create). But I would also like to perform DMA to and from a buffer allocated by an application. What I exactly want to do is: Allocate an aligned buffer in the app (with e.g. posix_memalign) Send the pointer to this buffer to the dext In the dext, retrieve the list of pages descriptors to be able to perform DMA without copy into (or from) this buffer. In IOKit, we can use methods such IOMemoryDescriptor::withAddressRange and IODMACommand::gen64IOVMSegments to map and retrieve the scatter gather list but I cannot find any information on how to do this in a dext with the PCIDriverKit framework. Can anybody help me on how to do that?
Replies
4
Boosts
0
Views
2.9k
Activity
Oct ’23
Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
I have applied for DriverKit for PCI transport entitlements. Selected Additional Capabilities DriverKit PCI (PrimaryMatch) for the app ID, then made a profile and download. Check the profile, which also includes com. apple. developer. driverkit. transport. pci. But when install this driverkit, log show the error:Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Replies
0
Boosts
0
Views
714
Activity
Aug ’23
Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci
Hi all, I got the entiltlements for the DriverKit PCI (primary match). so I added it to my driver app ID. so, I can show the ~~transport.pci entitlement item on my provision profile. However, macOS system still block the my driver, and log show the " Unsatisfied entitlements: com.apple.developer.driverkit.transport.pci"
Replies
2
Boosts
0
Views
1.6k
Activity
Jul ’23
How to assign dma to pci and get data
Hi, I am working in DriverKit(dext) environment with PCIDriverKit. How to assign dma to pci device? How to know the address to get the data recorded in the memory using dma in the pci device? There are some information related to kext, but, i'm looking for information or sample code for dext. Any little information would be helpful.
Replies
0
Boosts
0
Views
902
Activity
May ’23
getDeviceMemoryWithIndex alternative in PCIDriverKit for DEXT
Hi, We have PCI storage device for which we use Kernel Driver. In kernel driver development we use getDeviceMemoryWithIndex to get IODeviceMemory and then we map it using IODeviceMemory->map then we fetch virtual memory using IOMemoryMap->getVirtualAddress. So my query is what's alternative for this in PCIDriverKit for developing DEXT. I found _CopyDeviceMemoryWithIndex api which seems similar to getDeviceMemoryWithIndex. But when I used this api then this is failing with error: 0xe00002cd (Device Not Open.) I'm doubting this failure because of IOPCIDevice->Open failure for which I have already created another thread [https://developer.apple.com/forums/thread/661711] to discuss this issue. There is no sample code available so I'm just following WWDC2020 presentation for Modernize PCI and SCSI drivers with DriverKit. My driver is loading and unloading on device connect/disconnect and able to fetch VID and DEVID from PCI registers. I'm using IOPCIDevice as provider and IOPCIMatch for driver matching. Any help or suggestion is really appreciated. Thanks
Replies
2
Boosts
0
Views
2k
Activity
May ’23
PCI transport entitlement / capability
We're invited to write PCI drivers for iPad, but there's no capability for PCI Driver Kit in Xcode and a com.apple.developer.driverkit.transport.pci key in your entitlements does not find its way into your embedded.provisionprofile with Automatically Manage Signing nor can you manually add it in the appID portal, because it's not there. Huh?
Replies
13
Boosts
0
Views
4.6k
Activity
Apr ’23
inaudible output after CoreAudio device initialises+limited number of controls per engine?
hi everyone, so i am wondering what else i must do after my device successfully completes the CoreAudio initialisation process? it seems ready to roll: but when i play something in itunes i don't hear anything. the slider moves as you'd expect. i compared some properties of the device to the headphone jack and noticed the latter maps to an output device (my headphones). in the case of this sound card, it's just a jack. is there something simple i'm missing? lastly, i noticed that the engine is limited to approximately 8 controls. i couldn't add the full 8 channels plus an 'allchannels' volume control, as you can see on the right panel of the second image. this is not due to a programming error. is it possible that the designers were stingy and used exactly 8 bits to describe the number of each kind of control on an engine (i.e. 8 toggles/8 selectors/8level controls)?
Replies
1
Boosts
0
Views
1.8k
Activity
Jan ’23
Why are the two different about M1 and Intel MacBook
Dear all we try to test a capture card in M1 and Intel Mac book . we find some different . insert thunderbolt device(pcie device). open OBS and open the video. Unplug the device without close the OBS(APP). re-plug the device . we find M1 can't find the Thunderbolt drive . thunderbolt port are block, we had to restart the pc and fix the problem . but intel Mac book have not the problem . if I close these app, and then Unplug the device , then we re-plug it , we find M1 And Intel MAC book can work. we summary it M1 have a thunderbolt block problem when app run to unplug the thunderbolt . Intel Mac have not the problem . I want to know how to fix the problem.
Replies
1
Boosts
0
Views
1.2k
Activity
Sep ’22
Kernel Panic triggered by PCIe DriverKit Extension
My company has been developing a DriverKit Extension for our ThunderBolt attached devices. The dext is part of a set of components developed to replace a complex kext. Our testing has gone well on Intel based machines, but I seem to be able to cause kernel panics on my M1 Mac Mini when running some tests from an application that sends commands to the dext. The crashes aren't immediate; they happen apparently when the device wakes from sleeping. If I don't enable some particular capabilities on the devices the code works fine. Unfortunately they are LLC crashes and I have no way to debug them. Has anyone dealt with something like this? panic(cpu 6 caller 0xfffffe001f038b94): "LLC Bus error from cpu2: FAR=0x600102068 LLC_ERR_STS/ADR/INF=0x11000ffc00000080/0x4300040600102068/0x5 addr=0x600102068 cmd=0x18(acc_cifl2c_cmd_rd_ld)" @AppleFireStormErrorHandler.cpp:424 Debugger message: panic Memory ID: 0x6 OS release type: User OS version: 21E258 Kernel version: Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 Fileset Kernelcache UUID: E642C8E63C1D004A6B6639342D386514 Kernel UUID: 79A2DE0A-5FBB-32B8-B226-9D5D3F5C25A4 iBoot version: iBoot-7459.101.3 secure boot?: YES Paniclog version: 13 KernelCache slide: 0x0000000016758000 KernelCache base: 0xfffffe001d75c000 Kernel slide: 0x0000000016ef8000 Kernel text base: 0xfffffe001defc000 Kernel text exec slide: 0x0000000016fe0000 Kernel text exec base: 0xfffffe001dfe4000
Replies
2
Boosts
0
Views
1.8k
Activity
Sep ’22
Impossible to develop DriverKit drivers for iPadOS
There is currently no way to "Bring your driver to iPad with DriverKit" because it's impossible to develop a driver because developers can neither deploy to the device nor run there because there is no way to procure development provisioning profiles with the required entitlements for actual hardware (USB, PCI). I bought an M1 iPad just to test this alleged new capability and the only thing it's good for so far is theoretically transferring files quickly or attaching some kind of ethernet dongle. My 1 month no-questions-asked returns window is going to close soon! FB10152280 FB10244398 FB10244627 FB10160665 FB10152361 FB10160793 FB10152210 FB10160567 FB10244046 FB10427776
Replies
0
Boosts
1
Views
1.6k
Activity
Jun ’22
How to install DriverKit dext by script
I read the doc of installing system extensions https://developer.apple.com/documentation/systemextensions/installing_system_extensions_and_drivers?language=objc , but actually our product is a framework and installed by .pkg. I/O Kit kext is installed by script in .pkg. So I meet a problem :how to install DriverKit dext by script?
Replies
1
Boosts
0
Views
2.2k
Activity
Apr ’22