views:

11

answers:

0

I am writing a PCIe device driver. With PCIe I have a storage device connected. I have allocated a buffer in memory using malloc() which I use to transmit data to and receive from my hardware. The buffer area is locked and the physical addresses of the locked pages are passed to the DMA, I have in my hardware. DMA uses physical addresses for data transmission to/from device. The transmission of data to storage device is working fine, that is whatever data I have in memory buffer is transmitted correctly to the hardware but as soon as I try to receive any data from my hardware in that buffer(in host memory), windows crashes!!I have tested it on Windows Vista and Windows 7 but both crashed on reading. I think windows is not letting PCIe write on its memory. If this is the issue, can you suggest anything to overcome this problem? Or if you think there is anything else which is causing this problem, please let me know. Any help is appreciated. Thanks.