Welcome to WinForumz.com!
FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Calculating Physical Address of users Virtual Memory

 
   Windows XP (Home) -> XP Device Driver RSS
Related Topics:
Virtual WebCam Driver - I want to build a virtual webcam driver. Like a WebCam, but that capture I tried to make it basing no videocap sample that comes in WINDDK [last version], but I didn't get sucess, because I don't know how to user-mode and..

how to ignore "Continue Anyway" while installing virtual w.. - Hi all, I try to write a virtual webcam by WDM. While on XP , the Hardware dialog appear and forge user must be press so that go next step of But , on Vista without this problem. Can you help me how..

WinXP 64-bit Virtual DMA_ADAPTER - Hi, I have a virtual bus driver over a USB bus. In this driver, I want to intercept the so that I get requests for The reason I want to do this is because in Windows XP 64-bit (unlike 32-bit) these

Memory allocation in windows kernel driver - Hi all, I'm in the of windows drivers and I'm trying to modify the passthru driver provided in the Windows Driver Kit. In I have some problems in memory I have to memorize into the

how application use Driver allocated memory space. - Hello all, i allocate memory in driver and pass the base address of this memory into the how the map this memory in user space. regards suli
Author Message
John

External


Since: Nov 02, 2007
Posts: 9



(Msg. 1) Posted: Fri Nov 30, 2007 11:47 am
Post subject: Calculating Physical Address of users Virtual Memory Get Alert
Archived from groups: microsoft>public>windowsxp>device_driver>dev (more info?)

What is the best way (XP/VISTA) to obtain the physicall address of the
users virtual memory durint a write operation.

Currently I am doing the following and it works. I build an array of
physical address and length. In the ISR if the next item in the DMA is
not NULL, I restart the DMA using the next item in the Array.
Out device does not support Scatter/Gather. I am doing it myself

for (idx = 0; Length > 0; idx++)
{
DmaPageLength = Length;
DmaAddress= IoMapTransfer(
NULL,
pMdl,
NULL,
Buffer,
&DmaPageLength,
TRUE TRUE == Write to device
);
Length -= DmaPageLength;
Buffer += DmaPageLength;
DmaArray[idx].buffer = (void *)DmaAddress.LowPart;
DmaArray[idx].nbytes = DmaPageLength;
DmaArray[idx].nwords = DmaPageLength/4;
DmaArray[idx].va = va;
}
DmaArray[idx].buffer = NULL;
DmaArray[idx].nbytes = 0;
DmaArray[idx].va = NULL;


I would like to get away from calling IoMapTransfer because I have
heard this is an obsoeite function.

So is there another way to obtain the physical address and lenth of
the users virtual address?

John

 >> Stay informed about: Calculating Physical Address of users Virtual Memory 
Back to top
Login to vote
Display posts from previous:   
   Windows XP (Home) -> XP Device Driver All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
  Windows XP
 Windows Vista!
 Win 2000/NT/98/ME


[ Contact us | Terms of Service/Privacy Policy ]