how to mapping virtualAddress to physicalAddress for pcie address space in PCIE driver?

yajun xue 0 Reputation points
2023-12-18T02:27:32.8066667+00:00

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 !

Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
12,074 questions
Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,686 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.