PC Review


Reply
Thread Tools Rate Thread

Calculating Physical Address of users Virtual Memory

 
 
John
Guest
Posts: n/a
 
      30th Nov 2007
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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Physical vs. Virtual Memory Richard Fangnail Windows XP General 13 7th Jul 2009 07:26 AM
virtual/physical memory?... =?Utf-8?B?Um9iTGVl?= Windows XP Basics 6 10th Nov 2004 09:13 PM
How can I get memory allocated on PHYSICAL RAM and garanteed not on virtual ram. FU.U.NA Microsoft Dot NET Framework 3 1st Apr 2004 05:21 AM
physical memory dump / virtual memory Jennifer Stewart Microsoft Windows 2000 0 5th Feb 2004 09:49 PM
Low virtual/physical memory Claire Onyimba Windows XP Hardware 1 1st Oct 2003 04:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:53 AM.