
IBM2520L8767
IBM Processor for ATM Resources
atmrm.chapt04.01
08/27/99
DMA QUEUES (DMAQS)
Page 115 of 553
Initialization of DMAQS
DMAQS is very simple to set up. The following steps should be followed to set up DMAQS:
1. Set up each of the three DMA queues.
To do this, you need to know the size of each queue (see
DMAQS Upper Bound Registers
on page 117
for choices). Given this information, the DMA queue is set up with two register writes in diagnostic mode
(see DMAQS Control Register).
dmaqs->lowerBound[q] = baseAddress
// should be aligned with size of queue
dmaqs->upperBound[q] = encodedSize;
// set encoded size of dma queue
The data structure for the DMA queue is now set up.
2. Set up the queue thresholds if they are being used:
dmaqs->threshold[q] = threshold
// set threshold size to be interrupted on
// may also need to set int mask
3. Set up the local DMA descriptor range if local descriptors are being used:
dmaqs->localDescLowerBound = localDescBase
// set base addr of local desc in charm memory
dmaqs->localDescUpperBound = localDescEnd;
ry
// set ending addr of local desc in charm memo
4. Set up any options that are being used in the DMAQS Control Register:
dmaqs->control[set] = ENABLE_DMA_QUEUES CLR_CHECKSUM_TO_FOXES
// set options/modes
5. Finally, clear the diagnostic bit:
dmaqs->control[clr] = DIAG_MODE
// clear the diag mode bit
6. Need to set up memory bank selection if necessary, but normally control memory is used.
Delayed Interrupts
When enabled, an IBM2520L8767 register can be moved to system memory before the interrupt is raised to
the system. The register and destination address are specified in the DMAQS Delayed Interrupt Source and
Destination Registers. This allows the RXQUE status register or the INTST status register to be read into sys-
tem memory before the interrupt is raised, thus removing PCI bus latency from your interrupt handler.
Another option is to use both sets of interrupt masks, but use only a single hardware interrupt. When this is
done, both delayed interrupt sources are read for interrupt two before the interrupt is raised. This allows the
user to setup mask 2 for errors only and mask 1 for normal mainline interrupts only.
The RXQUE enabled status registers should also be considered as they show only the status that you are
interested in.
The DMA transfer to move the registers is the highest priority in the DMA scheduling mechanism. However,
you still may need to tune your DMA scheduling so these interrupts are not delayed behind a 64-K transfer.