>Hi Jeff,
For completeness, I’ll ask (though I suspect I know the answer): Does your
device support scatter/gather in hardware? Can you show us how you’re
initializing your DEVICE_DESCRIPTION data structure?What’s the maximum number of map registers that’s returned to you from
IoGetDmaAdapter?
Yes, the device supports HW scatter/gather. I am not using a DEVICE_DESCRIPTION structure. That is, I am not calling IoGetDmaAdapter(). This is a WDF driver so I am calling WdfDmaEnablerCreate() followed by WdfDmaEnablerGetFragmentLength(). The fragment length returned is 0x40000000 (1GB). (hmmm…) That translates to 0x40000 pages (thus 0x40000 map registers ?).
Before calling WdfDmaEnablerCreate(), I call:
WDF_DMA_ENABLER_CONFIG_INIT(&dmaConfig,
WdfDmaProfileScatterGather64,
pDmaDevExt->MaximumTransferLength);
where pDmaDevExt->MaximumTransferLength is set to 0x140000000 (5GB)
I’m also not sure from your note of what the problem is that you’re
experiencing, exactly. You said “I get some data errors just above 2GB (all
0’s). And then no data written to the rest of the buffer.” – Is THAT the
problem you’re having?
That is the application observable problem. In the driver, I appear to stop getting interrupts at some point from the receive DMA interrupt source (set to interrupt on EOP (end of packet)). Not sure what else is happening/not happening…
Also, I have to ask: You’re quite confident that the actual DMA device is
programmed correctly and is working correctly?
Actually, I am not sure if the device is working correctly. We are using a 3rd party FPGA IP core for the DMA engine and the engineers have indicated they have not tried transfers this large.
I am confident the device and my control of it is working properly for transfer sizes of 2GB and less. Actually, sizes of 0x80017DFC bytes are working consistently. I have a simple 4 byte incrementing data pattern comparison test that succeeds.
Peter
OSR