PCIe driver using WDF: Cannot access memory value

wenjay chen 0 Reputation points
2024-06-07T02:52:36.5766667+00:00

I am writing a PCIe driver using WDF, but I'm having trouble accessing memory values. Specifically, when I use MmMapIoSpaceEx to map Bar0 memory space to a virtual address with continuous length, I cannot read or write values to memory. The device has 64M length memory, and the Bar0 space is used for device registers. I have already checked the configure space, and the same device works fine on Ubuntu. Can anyone suggest a solution?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,622 questions
Windows Driver Kit (WDK)
Windows Driver Kit (WDK)
A set of Microsoft tools that are used to develop, test, and deploy Windows drivers.
30 questions
0 comments No comments
{count} votes