how to mapping virtualAddress to physicalAddress for pcie address space in PCIE driver?
I want to mapping virtualAddress to physicalAddress in driver for PCIE device.
I know that I can user MmMapIoSpace in general,but now it must cause bugcheck: 1A and parameter1:0x1233.
Bug Check 0x1A: MEMORY_MANAGEMENT
parameter1 0x1233 : A driver tried to map a physical memory page that wasn't locked. This action is illegal because the contents or attributes of the page can change at any time. A bug in the code made the mapping call. Parameter 2 is the PFN of the physical page that the driver attempted to map.
I also try use other API, for example: MmAllocateMdlForIoSpace 、 MmMapLocaedPageSpecifyCached etc,do not work.
please!! help me !