How to get physical address from the virtual address

Hi

Any idea of how to get physical address from the virtual address

Thanks

David

In what context? For what?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Zhihua LI”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 10, 2004 5:01 AM
Subject: [ntdev] How to get physical address from the virtual address

>
>
>
>
>
> Hi
>
> Any idea of how to get physical address from the virtual address
>
>
> Thanks
>
> David
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com

system context. I would like to use my own buffer to replace DMA buffer.
And my low layer need me to pass the

virtual address and physical address down. But now I only can get my own
buffer’s virtual address :slight_smile:

“Maxim S. Shatskih”

m> cc:
Sent by: Subject: Re: [ntdev] How to get physical address from the virtual address
bounce-166744-14464@li
sts.osr.com

02/10/2004 10:36 AM
Please respond to
“Windows System
Software Devs Interest
List”

In what context? For what?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Zhihua LI”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 10, 2004 5:01 AM
Subject: [ntdev] How to get physical address from the virtual address

>
>
>
>
>
> Hi
>
> Any idea of how to get physical address from the virtual address
>
>
> Thanks
>
> David
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ctl.creative.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Hi,
Try MmGetPhysicalAddress function.

Hope this will help.
Dev

-----Original Message-----
From: Zhihua LI [mailto:xxxxx@ctl.creative.com]
Sent: Tuesday, February 10, 2004 8:18 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to get physical address from the virtual
address

system context. I would like to use my own buffer to replace DMA buffer.
And my low layer need me to pass the

virtual address and physical address down. But now I only can get my own
buffer’s virtual address :slight_smile:

“Maxim S. Shatskih”

System Software Devs Interest List"
m> cc:

Sent by: Subject: Re: [ntdev]
How to get physical address from the virtual address
bounce-166744-14464@li

sts.osr.com

02/10/2004 10:36 AM

Please respond to

“Windows System

Software Devs Interest

List”

In what context? For what?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Zhihua LI”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 10, 2004 5:01 AM
Subject: [ntdev] How to get physical address from the virtual address

>
>
>
>
>
> Hi
>
> Any idea of how to get physical address from the virtual address
>
>
> Thanks
>
> David
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ctl.creative.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: dsingh@in.rainbow.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

depending on the hardware in the system MmGetPhysicalAddress may not
give you an address that your device can access. You shouldn’t use
this.

You can hand a locked MDL to the hal’s DMA API and it will build a list
of the physical addresses that make up the buffer for you. Look at
routines IoGetDmaAdapter as the starting point - there are pointers to
the routines you need inthe DMA_ADAPTER structure it returns.

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
dsingh@IN.rainbow.com
Sent: Monday, February 09, 2004 10:01 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] How to get physical address from the virtual
address

Hi,
Try MmGetPhysicalAddress function.

Hope this will help.
Dev

-----Original Message-----
From: Zhihua LI [mailto:xxxxx@ctl.creative.com]
Sent: Tuesday, February 10, 2004 8:18 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] How to get physical address from the virtual
address

system context. I would like to use my own buffer to replace DMA buffer.

And my low layer need me to pass the

virtual address and physical address down. But now I only can get my own

buffer’s virtual address :slight_smile:

“Maxim S. Shatskih”

System Software Devs Interest List"

m> cc:

Sent by: Subject: Re:
[ntdev] How to get physical address from the virtual address

bounce-166744-14464@li

sts.osr.com

02/10/2004 10:36 AM

Please respond to

“Windows System

Software Devs Interest

List”

In what context? For what?

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Zhihua LI”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, February 10, 2004 5:01 AM
Subject: [ntdev] How to get physical address from the virtual address

>
>
>
>
>
> Hi
>
> Any idea of how to get physical address from the virtual address
>
>
> Thanks
>
> David
>
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ctl.creative.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: dsingh@in.rainbow.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com