hello,
Iam writing a wdm driver for windows 98 SE. iam stuck up with a
problem. i have a segment page for which i need to get the physical
address. I think windows 2000 has a function MmGetPhysicalAddress(…) to
get physical address from a valid virtual address. But i do not find any
function in 98DDK to do the same. Is there any function or method to get
the physical address from virtual address. Can any one help me to solve
this problem…
Thanx in Advance.
Regards,
Madhu.
Hi Madhu,
use MmGetMdlVirtualAddress for your purpose. For this u ned to have MDL of that virtual memory.
I believe it will help u.
good luck
From: “madhu”
>Reply-To: “Windows System Software Devs Interest List”
>To: “Windows System Software Devs Interest List”
>Subject: [ntdev] Virtual to Physical Address
>Date: Tue, 28 Oct 2003 01:31:59 -0500
>
>hello,
> Iam writing a wdm driver for windows 98 SE. iam stuck up with a
>problem. i have a segment page for which i need to get the physical
>address. I think windows 2000 has a function MmGetPhysicalAddress(…) to
>get physical address from a valid virtual address. But i do not find any
>function in 98DDK to do the same. Is there any function or method to get
>the physical address from virtual address. Can any one help me to solve
>this problem…
>
>Thanx in Advance.
>
>Regards,
>Madhu.
>
>—
>Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com
Get Married! Search from 7 lakh Brides & Grooms.
What do you need physical addresses for?
Typically the only reason a driver needs physical addresses is for DMA. IF
that is your need, then you should look at using a DMA adapter object, map
registers, and MapTransfer(). This will give you the logical addresses for
the memory you are trying to map. Logical addresses are an abstaction of
physical addresses, which is what DMA hardware would need to be programmed
with. Walter Oney’s 2nd edition of “Programming the Windows Driver Model”
has an excellent section on DMA and the CD includes sample drivers that use
MapTransfer.
–
Bill McKenzie
Compuware Corporation
Watch your IRPs/IRBs/URBs/SRBs/NDIS pkts with our free WDMSniffer tool:
http://frontline.compuware.com/nashua/patches/utility.htm
“madhu” wrote in message news:xxxxx@ntdev…
>
> hello,
> Iam writing a wdm driver for windows 98 SE. iam stuck up with a
> problem. i have a segment page for which i need to get the physical
> address. I think windows 2000 has a function MmGetPhysicalAddress(…) to
> get physical address from a valid virtual address. But i do not find any
> function in 98DDK to do the same. Is there any function or method to get
> the physical address from virtual address. Can any one help me to solve
> this problem…
>
> Thanx in Advance.
>
> Regards,
> Madhu.
>
>