Mapping Phys To Linear and vice versa
Posted on 1997-02-10
This is my situation (and problem):
0. I first allocate some pages using PageAllocate()
1. I then lock those pages in memory using LinPageLock()
2. I get the physical addresses of the pages I've locked using CopyPageTable()
3. I then try to get the linear address from the physical address using MapPhysToLinear()
My problem is that the linear address I get from step 0 is different from the one I get from step 3. In my VxD, at some point, I have a physical address and the VxD wants the linear address corresponding to it, so it can write something there. This linear address should be the same one that the application also has (the application records the linear address it gets from the PageAllocate() call), so that the application can later see what the VxD wrote.
Why are those linear addresses different? Do the two addresses still point to the same region so that if the VxD writes something, it can be seen in the application?