
IBM2520L8767
IBM Processor for ATM Resources
DMA QUEUES (DMAQS)
Page 114 of 553
atmrm.chapt04.01
08/27/99
Descriptor Based DMAs
This is the recommended approach to processing DMAs. A single descriptor or a descriptor chain is built that
describes the actions to take. The descriptor is then enqueued to the proper DMA queue. The number of the
descriptor in the DMA chain is placed in the lower six bits of the descriptor address as it is enqueued.
Register Based DMAs
While register based DMAs can be enabled and used, they are not recommended because they are not as
efficient and they do not leave a debug trail as the descriptors do in the DMA queue. These should not be
used concurrently with descriptor-based DMAs for a particular queue, but register-based and descrip-
tor-based DMAs can be used on different queues. One possible use for register-based DMAs is doing DMAs
from the core.
Polling, Interrupts, or Events
There are several choices for handling DMA completion. First, the status register can be polled. While not
very efficient, it is the easiest option. Second, you can use interrupts to tell when a DMA is done. Again, not
very efficient. However, interrupts should be used to tell when a DMA error has happened.
One way to deal with DMA completes is the use the RXQUE event mechanism. By generating events, the
user can dump in DMA descriptor and clean up at a later time when it is convenient. The user can use the
automatic DMA events using the queue on DMA complete flag, or the user can place a user event on an arbi-
trary queue by writing a DMA descriptor that does an explicit RXQUE enqueue with user data.
Error Detection and Recovery
Ideally, there should not be any errors. Errors are usually user-errors in the DMA descriptor which need to be
fixed and are not recoverable. Errors on the PCI bus (i.e. parity) should not be happening in a normal working
DMA and must be recovered in GPDMA. Upon successful completion of the recovered DMA, DMAQS will
resume operation.
DMA/Queue Scheduling Options
There are three DMA queues. Queue zero is higher priority then the other two. This high priority queue is
always scheduled to go if the current descriptor is ready. The other two queues (Q1/Q2) are of equal priority
and are scheduled in a round robin fashion when the descriptor is ready. This was meant to provide a trans-
mit DMA queue, and receive DMA queue, and a high priority DMA queue. However, these queues can be
used for any purpose by setting the routing registers properly.
Arbitration of Queues: The queues can be arbitrated after each DMA request length operation, after complete
DMA descriptor chains complete, after single DMA descriptor in a chain completes. The queues can also be
placed in true round robin mode, where all three queues have equal priority. No matter how the queues are
arbitrated, the delayed interrupt transfer and DMA descriptor transfer (from system to queue) are always
highest priority and are arbitrated after every DMA request length operation.