The answer is that there is no such guarantee in the long run, and you
probably won’t get a definite “stop doing this” if some day the physical
address could change.
Hot-Plug memory is one of the futuristic things that I suspect could
blow you out of the water - if we know that there aren’t any active DMA
transactions with memory on a particular memory module we could relocate
its contents and let it be removed.
Presumably you own the memory holding the descriptors. What if you
allocated them using MmAllocateMdlPages(), prepared them for DMA and
then got an MDL for the scatter gather list and mapped that to get your
virtual access.
-p
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Ward
Sent: Monday, December 18, 2006 4:27 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Is the physical address of a buffer in non paged
pool constant?
I have a DMA engine which pulls in a block of descriptors (to part of
the
SG list for the user’s buffer). The last entry in the block is the next
block of descriptors - thus chaining the whole SG list. So the DMA
engine
DMA’s it’s way down the list.
I don’t really want to establish the physical addresses for my
descriptor
blocks on every transfer. I’d rather do it just once.
If there is no guarantee, maybe I’d have to look at allocating lumps of
physically contiguous memory for the descriptor blocks to minimise the
overheads. But since the descriptor blocks might be quite large (500KB
or so)
and I have six of these devices (or possibly twelve or eighteen) per
system
I’m keen not to allocate so much physically contiguous memory.
Don
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: 19 December 2006 00:04
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Is the physical address of a buffer in
non paged pool constant?
Why do you want to know this? If this were a guarantee, what
would you do with this information?
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Ward
Sent: Monday, December 18, 2006 3:46 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Is the physical address of a buffer in non paged pool
constant?
If I find out the physical address of one of my buffers in non paged
pool, can I assume it won’t change?
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer