From the research I have done over the last couple of days, I think I may
have got my head around using DMA and scatter gather list, unfortunately the
PCI card is still under development so I can not put this into practice.
From the device StartDevice routine, I will need to read the PCI device
configuration space, store the BAR regions for my device, and create a DMA
bus master adapter using IoGetDmaAdapter, then allocate the Common Buffer
for DMA read operations. Finally register the device driver’s interrupt
service routine to acknowledge when the PCI device DMA data transfer has
completed.
Assuming that my device is using Direct I/O for data transfers, during a
dispatched read request I will get an MDL describing the user’s buffer.
using this MDL I will need to call GetScatterGatherList from the DMA adapter
allocated from the Start Device routine. this will convert the MDL to a NT
scatter gather list, which can then be mapped to my PCI device DMA scatter
gather list.
At this point I should be at a stage where I can manually program my PCI
device DMA to start the data transfer from the PCI device DMA to my mapped
scatter gather list. (Is this correct?)
In the interrupt service routine I will need to detect when the PCI device
DMA data transfer has completed, and acknowledge the interrupt and queue for
DPC
In the DPC routine return the scatter gather list by calling
PutScatterGatherList from the adapter dmaoperations which will flush the
buffers and then complete the request.
Now the question is am I on the right track here? any advice or suggestions
would be most appreciated
Regards
James
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of James Dunning
Sent: 07 June 2005 10:02
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Supporting DMA confusion…
Thanks for pointing me in the right direction guys.
Just out of interest, when is the OSR search database usually updated? it
seems like it was last updated in December 2004? as I am having trouble
searching for the posts
“DMA + common buffer ARC” recommended by Russ Poffenberger
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Maxim S. Shatskih
Sent: 06 June 2005 17:44
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Supporting DMA confusion…
Yes. The Windows routines a) convert MDL to SGL b) create the necessary
bounce buffers for 32bit card without the Dual Address Cycle feature on the
machine with > 4GB RAM.
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com mailto:xxxxx
http://www.storagecraft.com http:
----- Original Message -----
From: James Dunning mailto:xxxxx
To: Windows System Software Devs Interest mailto:xxxxx List
Sent: Monday, June 06, 2005 6:34 PM
Subject: RE: [ntdev] Supporting DMA confusion…
Thanks for that, I actually meant that the DMA control registers which are
needed to drive the device DMA operations from the DMA control registers
will be arranged within the Base Address Registers defined in the device
config space, sorry for the confusion.
so based on your reply, I can still use the scatter gather DMA routines in
the ddk to construct the PRD tables or scatter gather tables, even though I
still need to drive the device DMA operations manually?
James
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Roddy, Mark
Sent: 06 June 2005 14:53
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Supporting DMA confusion…
You use the scatter gather dma routines in the ddk to obtain the addresses
that you feed to your pci device dma logic. Controlling your device dma
operations is of course your responsibility. Obviously, as you have figured
out, the system cannot program your device’s dma controller for you, that is
your responsibility.
I am not sure what exactly you mean by “obtaining the DMA control and status
registers, and the PRD control register from the PCI configuration”. The
control registers for your pci device ought to be arranged within the Base
Address Registers defined in your device config space. You ought to never be
accessing PCI config space directly. Instead you are handed the set of
negotiated BAR regions for your device in your StartDevice routines, and you
use those addresses for communication with your device.
=====================
Mark Roddy
_____
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Dunning
Sent: Monday, June 06, 2005 9:35 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Supporting DMA confusion…
Hi all,
I have been asked to develop a PCI driver for a PCI card which is currently
being developed by our hardware engineers which will have a DMA controller
which supports scatter gather. now I have noticed that the windows xp ddk
has DMA routines, am I right to assume that these DMA routines will only
support the system DMA and bus master DMA controller on the system
motherboard and not on the PCI card itself?
Originally I thought these DMA routines will interact with the DMA
controller on the actual PCI card but now I am having doubts, could someone
please clarify?
I am assuming that I will need to drive the DMA on the PCI card manually by
obtaining the DMA control and status registers, and the PRD control register
from the PCI configuration, so I can build my own scatter gather list.
Regards
James
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
This email and any files attached to it are of a confidential nature and
intended for the exclusive use of the individual or entity to whom they are
addressed. If you are not the intended recipient, please be advised that you
have received this email in error and action should be taken to inform the
originator and this email should be deleted immediately and any copies made
should be destroyed. If you are not the intended recipient, any form of
disclosure, distribution, printing, copying or any other use of this email
or the information in it or in any attachments is strictly prohibited and
may be unlawful. Any views, opinions or other information expressed in the
email and any attachments are those of the originator and not given or
endorsed by General Dynamics UK Ltd.In compliance with the various
Regulations and Acts, please be aware that General Dynamics UK Ltd reserves
the right to monitor all emails and email attachments, both inbound and
outbound, allowing legitimate business practice to continue.In addition to
monitoring, General Dynamics UK Ltd also provides appropriate Antivirus
measures scanning all incoming and outgoing email and email attachments.
However, email communications cannot be guaranteed to be secure or free of
errors as information may be intercepted, corrupted, amended, lost,
destroyed or contain viruses. General Dynamics UK Ltd do not accept
liability or responsibility for any such matters or the consequences
thereof.
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
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@storagecraft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
This email and any files attached to it are of a confidential nature and
intended for the exclusive use of the individual or entity to whom they are
addressed. If you are not the intended recipient, please be advised that you
have received this email in error and action should be taken to inform the
originator and this email should be deleted immediately and any copies made
should be destroyed. If you are not the intended recipient, any form of
disclosure, distribution, printing, copying or any other use of this email
or the information in it or in any attachments is strictly prohibited and
may be unlawful. Any views, opinions or other information expressed in the
email and any attachments are those of the originator and not given or
endorsed by General Dynamics UK Ltd.In compliance with the various
Regulations and Acts, please be aware that General Dynamics UK Ltd reserves
the right to monitor all emails and email attachments, both inbound and
outbound, allowing legitimate business practice to continue.In addition to
monitoring, General Dynamics UK Ltd also provides appropriate Antivirus
measures scanning all incoming and outgoing email and email attachments.
However, email communications cannot be guaranteed to be secure or free of
errors as information may be intercepted, corrupted, amended, lost,
destroyed or contain viruses. General Dynamics UK Ltd do not accept
liability or responsibility for any such matters or the consequences
thereof.
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
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@generaldynamics.uk.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
This email and any files attached to it are of a confidential nature and
intended for the exclusive use of the individual or entity to whom they are
addressed. If you are not the intended recipient, please be advised that you
have received this email in error and action should be taken to inform the
originator and this email should be deleted immediately and any copies made
should be destroyed. If you are not the intended recipient, any form of
disclosure, distribution, printing, copying or any other use of this email
or the information in it or in any attachments is strictly prohibited and
may be unlawful. Any views, opinions or other information expressed in the
email and any attachments are those of the originator and not given or
endorsed by General Dynamics UK Ltd.In compliance with the various
Regulations and Acts, please be aware that General Dynamics UK Ltd reserves
the right to monitor all emails and email attachments, both inbound and
outbound, allowing legitimate business practice to continue.In addition to
monitoring, General Dynamics UK Ltd also provides appropriate Antivirus
measures scanning all incoming and outgoing email and email attachments.
However, email communications cannot be guaranteed to be secure or free of
errors as information may be intercepted, corrupted, amended, lost,
destroyed or contain viruses. General Dynamics UK Ltd do not accept
liability or responsibility for any such matters or the consequences
thereof.
This email and any files attached to it are of a confidential nature and
intended for the exclusive use of the individual or entity to whom they are
addressed. If you are not the intended recipient, please be advised that you
have received this email in error and action should be taken to inform the
originator and this email should be deleted immediately and any copies made
should be destroyed. If you are not the intended recipient, any form of
disclosure, distribution, printing, copying or any other use of this email
or the information in it or in any attachments is strictly prohibited and
may be unlawful. Any views, opinions or other information expressed in the
email and any attachments are those of the originator and not given or
endorsed by General Dynamics UK Ltd.In compliance with the various
Regulations and Acts, please be aware that General Dynamics UK Ltd reserves
the right to monitor all emails and email attachments, both inbound and
outbound, allowing legitimate business practice to continue.In addition to
monitoring, General Dynamics UK Ltd also provides appropriate Antivirus
measures scanning all incoming and outgoing email and email attachments.
However, email communications cannot be guaranteed to be secure or free of
errors as information may be intercepted, corrupted, amended, lost,
destroyed or contain viruses. General Dynamics UK Ltd do not accept
liability or responsibility for any such matters or the consequences
thereof.</mailto:xxxxx></mailto:xxxxx></http:></mailto:xxxxx>