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. In my hardware, I have a DMA which uses physical addresses for data transmission.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.