BCM1250/BCM1125/BCM1125H
User Manual
10/21/02
B r o a d c o m C o r p o r a t i o n
Page
12
Section 3: System Overview
Document
1250_1125-UM100CB-R
When a register is marked as cleared by a read it will be cleared by any read to it. Care should therefore be
taken to ensure that a compiler or debugger does not split an access to the register into multiple reads. For
example if a 64-bit access is split into two 32-bit reads, the first of these reads will get valid data and clear the
register and the second will get zeros (compilers will probably do this if they are configured to only use 32-bit
registers). Similarly, the value of these registers cannot be read from a byte-by-byte memory dump. Most (but
not all) of the registers with read side effects have an alias (with
_debug
appended to the register name) that
does not have the side effect for a debugger to use.
C
OHERENCE
The system maintains coherence for all memory operations including DMA. This coherence means that a read
reference to memory space will return the most up to date version of the data. The L2 cache, processors,
memory controller and I/O bridges all cooperate to deliver the correct version of each cache block. The
coherency is managed by hardware, other than selecting the correct cachability mode no action is needed by
software.
Coherence works at cache line granularity, for each cache block (aligned 32 byte block of memory) there is at
all times an owner. The default owner of a block is either the L2 cache or main memory, they work together to
service bus requests. Blocks that are being shared between bus agents are owned by the L2 or memory. Any
agent that wishes to modify a cache line must become exclusive owner. When it makes the request the current
owner of the block will give it up and any shared copies will be invalidated. Although the data transfer may
occur at any time following the request, the ownership transfer is deterministic. If an agent receives ownership
of a block it is possible that it will lose ownership before it has received the data; in this case it can perform one
operation on the block before passing the data to the new owner, this is required to avoid live-lock when two
agents are trying to write to the same block. Coherent memory references check L1 and L2 tags and the partial-
line merge buffer in the I/O bridges at bus speed. If a block is exclusively owned, a request for that line can
only be serviced by the owner, if the block is shared it can reside in more than one location, but will be returned
from the L2 or memory (as the default owner). When block ownership is transferred (either from one exclusive
owner to another, or from an exclusive owner to the default) the data transfer is snooped by the L2/memory so
the new owner gets a clean copy of the line.
A line in the level 1 cache (in the processor) will be in one of six states: Invalid, Shared, Exclusive Clean,
Exclusive Dirty, Non-coherent Clean or Non-coherent Dirty. Stores are permitted to all valid lines except for
Shared ones, which must be upgraded to Exclusive before a store is possible. Dirty lines will be written back
if the line is evicted to make way for a new fill, if evicted due to another device requesting the line (an
intervention), or if explicitly written back by software (either a CACHE instruction forcing write-back, or a
PREFetch instruction with the nudge hint).
Lines will only be put in the L1 cache Non-coherent if their TLB entry has the cacheable non-coherent cache
attribute. These lines will not play a part in the ZBbus coherence protocol, and will need careful management
by software. In general this should only be done for accessing memory that is genuinely non-coherent, which
is true for any memory attached on the PCI bus or HyperTransport fabric. Memory attached on any of these
interfaces will not be cached in the L2 cache. Memory attached on these is outside the coherency domain: they
are I/O connections and do not carry coherency messages, so some other device could update the memory
without the CPU being informed that its cached copy is now out of date.