User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 7: DMA Page
155
This format is useful for scatter/gather operations, in particular when transmit packets are being composed and
headers inserted or removed. Care must be taken since the format allows for very low performance settings:
for example if all buffers are only 3 bytes then the overhead of fetching descriptors will completely dominate
the data transfers.
When the unaligned buffer format is used for packet reception and the start and end of a buffer are not aligned
to a cache block boundary the DMA engine provides two options. The high performance option is for the
interface to always write full cache lines (using the ZBbus WriteInvalidate command) and therefore overwrite
the bytes before and after the buffer with UNPREDICTABLE data. The lower performance option is to use a
read-modify-write to ensure only the valid bytes are modified, this will have a tendency to back up the read-
modify-write queue (since the write must be queued for the read latency) and should therefore be avoided if
possible.
DMA C
OHERENCE
AND
C
ACHE
O
PTIONS
All DMA transfers are coherent with the CPU L1 caches, the L2 cache and memory. On reads the latest copy
of the data will be retrieved from the current owner and on writes any existing copies of the data will be
invalidated or updated.
The DMA controllers can drive a L2-cache request attribute with transfers. This will cause the data to be
allocated in the L2 cache if the cache misses (if the L2 cache hits it will always be updated regardless of the
attribute). The channel configuration sets how many blocks from the start of a packet should be marked for
allocation in the L2 cache (this can be set larger than the maximum packet size to have complete packets sent
to the cache). The L2 is still being used as a cache, the data still has a memory address and can be evicted
from the cache to memory if the L2 replacement algorithm requires it.
The network and serial port interfaces have data buffers that are aligned to a cache block boundary and are
an integral number of cache blocks in size, so on incoming transfers they never need to perform read-modify-
write operations (the actual packet data may be offset from the start of the buffer and may finish short of the
end of the buffer, but the DMA will always be padded out to a full cache line at each end). The writes to memory
are always made with the write-invalidate command, which invalidates any copies of the block in L1 caches,
and returns ownership of the block to the L2 cache and memory system (the default owner).
In the standard aligned buffer mode, or the unaligned buffer mode with WriteInvalidate, device driver code has
to take care not to store any additional data in the cache block that a buffer starts or ends in. Particular care
must be taken with buffer link pointers and buffer header information at the start of the buffer. Even if an offset
is applied in the descriptor the buffer is still aligned and any bytes before the offset will be overwritten with
UNPREDICTABLE values when a packet is received. In the standard mode the end of the buffer is always
aligned so there is not a problem, but in the WriteInvalidate unaligned mode if the buffer has an unaligned end
the bytes for the rest of the cache block that contain the end of the buffer will be overwritten with
UNPREDICTABLE data.
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...