
4-20
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Cache Coherency—MEI Protocol
4.7.6
Atomic Memory References
The Load Word and Reserve Indexed (
lwarx
) and
Store Word Conditional Indexed
(
stwcx.
) instructions provide an atomic update function for a single, aligned word of
memory. While an
lwarx
instruction will normally be paired with an
stwcx.
instruction
with the same effective address, an
stwcx.
instruction to any address will cancel the
reservation. For detailed information on these instructions, refer to Chapter 3, “Instruction
Set Model,” in this book and Chapter 8, “Instruction Set,” in the
Programming
Environments Manual
.
4.7.7
Cache Reaction to Specific Bus Operations
There are several bus transaction types defined for the G2 core bus. The G2 core must
snoop these transactions and perform the appropriate action to maintain memory coherency
as shown in Table 4-6. A processor may assert core_artry_out for any bus transaction due
to internal conflicts that prevent the appropriate snooping. The transactions in Table 4-6
correspond to the transfer type signals core_tt[0:4], described in Section 8.3.4.1, “Transfer
Type.”
Table 4-5. Memory Coherency Actions on Store Operations
Cache State
Bus Operation
core_artry
Action
M
None
Don't care
Modify cache
E
None
Don't care
Modify cache, mark M
I
RWITM
Negated
Load data, modify it, mark M
I
RWITM
Asserted
Retry the RWITM
Table 4-6. Response to Bus Transactions
Snooped Transaction
G2 Core Response
Clean block
No action is taken
Flush block
No action is taken
Write-with-flush
Write-with-flush-atomic
Write-with-flush and write-with-flush-atomic operations occur after the processor issues a
store or
stwcx.
instruction, respectively.
If the addressed block is in the exclusive state, the address snoop forces the state of
the addressed block to invalid.
If the addressed block is in the modified state, the address snoop causes core_artry_out
to be asserted and initiates a push of the modified block out of the cache and changes
the state of the block to invalid.
The execution of an
stwcx.
instruction cancels the reservation associated with any
address.
Kill block
The kill block operation is an address-only bus transaction initiated when a
dcbz
instruction is executed; when snooped by the G2 core, the addressed cache block is
invalidated if in the E state, or flushed to memory and invalidated if in the M state, and any
associated reservation is canceled.
F
Freescale Semiconductor, Inc.
n
.