
IBM3206K0424
IBM Processor for Network Resources
Preliminary
DMA QUEUES (DMAQS)
Page 156 of 676
pnr25.chapt04.01
August 14, 2000
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 occurred.
One way to deal with DMA completes is to 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 auto-
matic DMA events using the queue on DMA complete flag, or the user can place a user event on an arbitrary
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 (that is, parity) should not occur in a normal working sys-
tem, and typically you do not want to recover them. However, if recovery is desired, the current DMA 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 0 is higher priority than the other two. This high priority queue is always
scheduled to go if the current descriptor is ready. The other two queues (Q1 and Q2) are of equal priority and
are scheduled in a round robin fashion when the descriptor is ready. This is meant to provide a transmit DMA
queue, receive DMA queue, and a high priority DMA queue. However, these queues can be used for any pur-
pose by setting the routing registers properly.
The queues can be arbitrated after each DMA request length operation, after complete DMA descriptor
chains complete, or after a 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.
Address Size
DMAQS can be operated with either 32- or 64-bit System Addresses. See PCINT 64-bit Control Register. All
DMAQS address registers are 64 bits wide. In 32-bit addressing mode, the high order portion of address reg-
isters are initialized at reset to
‘
0
’
, and cannot be modified. In 32 bit addressing mode, word four of the DMA
Buffer Descriptor is ignored.