- Is Map Register a hardware mechanism in Windows?
- Posted by Kai Lidda on June 27th, 2008
By using Common Buffer, I get 2 address - a vitual address for driver and a
logical address for device.
The logical address is not continuous memory in physical address,
but DMA device need a continuous memory to do data transfer.
So, the Map Register mechanism let a logical address mapping to physical for
DMA device.
Is Map Register a hardware mechanism in Windows?
--
Sincerely Yours,
---------------------------------------
- Posted by Maxim S. Shatskih on June 27th, 2008
Set ScatterGather == FALSE in IoGetDmaAdapter.
This will force the DMA routines to use the temporary contiguous buffer for
DMA.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
- Posted by Kai Lidda on June 28th, 2008
About detail handle.
DMA device has a register in which the user fill a physical memory address.
like a bus master.
I can use AllocateCommonBuffer to get the logical address that the Map
register map the logical address into physical memory.
Because the DDK say that don't use GetPhysicalAddress to get the physical
address, i should assign this logical address to the DMA register, right?
How can the windows handle the logical-to-physical mapping?
Can the DMA device use the logical address to get physical memory data?
--
Sincerely Yours,
"Maxim S. Shatskih" wrote:
- Posted by Maxim S. Shatskih on June 30th, 2008
Yes you can.
On some machines, the bus bridges can have hardware facilities for this
translation, like AGP has a GART.
Also, there is a way of allocating a logically contiguous a common buffer
internally and copying all data to it.
Windows DMA support will do this automatically for you. The first way will be
employed if there is such a hardware and the bus driver like AGP440 or PCI is
aware of it.
The second way will be used if you will set ->ScatterGather to FALSE, and also
for DMA over 4GB from a 32bit device without dual-address-cycle facility.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
- Posted by Kai Lidda on July 1st, 2008
Thanks You.
--
Sincerely Yours,
"Maxim S. Shatskih" wrote: