Hello everyone.
I have been developing PCIe device driver through Thunderbolt. However, it was confirmed that up to three devices connected to the daisy chain worked normally, but the fourth device failed to operate the _CopyDeviceMemoryWithIndex() function for connection with the BAR0 App and did not work properly. The standard specification of Thunderbolt 3/4 is said to be supported by daisy chain connection up to 6-device, but in reality, it is only 3 units, so I ask the forum for technical confirmation. Of course total 4 device by 2-port x 2-device daisy chain connecting has working well. The PCI entry in System information indicates that all devices have normal load of the PCIe device driver.
Thank you.
The standard specification of Thunderbolt 3/4 is said to be supported by daisy chain connection up to 6-device, but in reality, it is only 3 units, so I ask the forum for technical confirmation.
The key point in determining device limitation on Thunderbolt are the words "up to". Because Thunderbolt is built directly on PCI, accessory bus utilization can vary widely which will also change the overall device count. You can get a clear picture off the state of the thunderbolt bus by running "/Applications/Utilities/System Information.app" and then selecting the "Thunderbolt/USB 4".
You found the right section in the screenshots above, but what do the other devices show as you move "down" the bus?
I have been developing PCIe device driver through Thunderbolt. However, it was confirmed that up to three devices connected to the daisy chain worked normally, but the fourth device failed to operate the _CopyDeviceMemoryWithIndex() function for connection with the BAR0 App and did not work properly.
Two points here:
-
The IOPCIFamily is largely open source, including it's underlying DEXT implementation, which you can find here.
-
_CopyDeviceMemoryWithIndex is a private function used by IOPCIDevice (DriverKit)inside Open() to create the memory mapping used by the MemoryReadX/MemoryWriteX. The exact behavior of those functions varies depending on the exact DEXT configuration, but you can see exactly what's going on by looking at the source. Regardless, I don't think you should or need be directly calling _CopyDeviceMemoryWithIndex.
...the fourth device failed to operate the _CopyDeviceMemoryWithIndex() function for connection with the BAR0 App and did not work properly.
Did Open() itself fail or was this your own call to _CopyDeviceMemoryWithIndex()? As I said above, I don't think you should be calling it, however, what error did it return?
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware