I try to read manytimes from wdm book of walter oney about DMA (Direct Method Access) but i still confuse in it. Now, i exchange the data from the driver using direct method. Inside the code of major function of read/write i use function like READ_REGISTER_USHORT or WRITE_REGISTER_USHORT for exchanging the data. If i use that function (from HAL), am i using DMA or not? If not, Is there any simple example about DMA?
Really appreciate your information.
?
Regards,
Sofian
Read “Driver Basics - DMA concepts” in latest issue of “The NT Insider”.
Afterwards, have a look at pcidrv sample code in your WDK ( in
src\general\pcidrv\sys <file:> ).
The DMA concept is relatively simple, but, unfortunately, DMA
implementation is not - you must delve into your device specifics.
Best wishes,
Alex Krol
________________________________
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of sahrizal sofian
Sent: Thursday, October 29, 2009 6:22 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] confussion about DMA
I try to read manytimes from wdm book of walter oney about DMA (Direct
Method Access) but i still confuse in it. Now, i exchange the data from
the driver using direct method. Inside the code of major function of
read/write i use function like READ_REGISTER_USHORT or
WRITE_REGISTER_USHORT for exchanging the data. If i use that function
(from HAL), am i using DMA or not? If not, Is there any simple example
about DMA?
Really appreciate your information.
Regards,
Sofian
— NTDEV is sponsored by OSR For our schedule of WDF, WDM,
debugging and other seminars visit: http://www.osr.com/seminars To
unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</file:>
sahrizal sofian wrote:
I try to read manytimes from wdm book of walter oney about DMA (Direct
Method Access) but i still confuse in it. Now, i exchange the data
from the driver using direct method. Inside the code of major function
of read/write i use function like READ_REGISTER_USHORT or
WRITE_REGISTER_USHORT for exchanging the data. If i use that function
(from HAL), am i using DMA or not? If not, Is there any simple example
about DMA?
Those functions are not DMA. In a DMA operation, your hardware reads
and writes from memory directly, without using the CPU.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
>Inside the code of major function of read/write i use function like READ_REGISTER_USHORT or >WRITE_REGISTER_USHORT for exchanging the data. If i use that function (from HAL), am i using DMA >or not?
You probably confuse about PCI transactions and DMA operations. A PCI device may have DMA capability but it is not necessary. As Tim said that READ_REGISTER_USHORT/WRITE_REGISTER_USHORT do not use DMA but this macros use PCI transactions like DMA. The main difference between READ_REGISTER_USHORT/WRITE_REGISTER_USHORT macros and DMA is that macros use a processor to move data but a DMA operation does not.
You could find a good sample of using DMA in \WinDDK\xxxx\src\general\PLX9x5. To better understand how DMA operations work in this sample you should look a specification for PLX device, which you could find in http://www.plxtech.com/.
Igor Sharovar
Thank you very much guys for the information.
— On Thu, 10/29/09, xxxxx@hotmail.com wrote:
From: xxxxx@hotmail.com
Subject: RE:[ntdev] confussion about DMA
To: “Windows System Software Devs Interest List”
Date: Thursday, October 29, 2009, 2:16 PM
>Inside the code of major function of read/write i use function like READ_REGISTER_USHORT or >WRITE_REGISTER_USHORT for exchanging the data. If i use that function (from HAL), am i using DMA >or not?
You probably confuse about PCI transactions and DMA operations. A PCI device may have DMA capability but it is not necessary. As Tim said that READ_REGISTER_USHORT/WRITE_REGISTER_USHORT do not use DMA but this macros use PCI transactions like DMA. The main difference between READ_REGISTER_USHORT/WRITE_REGISTER_USHORT macros and DMA is that macros use a processor to move data but a DMA operation does not.
You could find a good sample of using DMA in \WinDDK\xxxx\src\general\PLX9x5. To better understand how DMA operations work in this sample you should look a specification for PLX device, which you could find in http://www.plxtech.com/.
Igor Sharovar
—
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer