
Sun Microelectronics
29
5. Cache and Memory Interactions
Note:
A change in virtual color when allocating a free page does not require a
D-Cache flush, because the D-Cache is write-through.
5.2.2 Committing Block Store Flushing
In UltraSPARC, stable storage must be implemented by software cache flush.
Data that is present and modified in the E-Cache must be written back to the sta-
ble storage.
UltraSPARC implements two ASIs (ASI_BLK_COMMIT_{PRIMARY,SECOND-
ARY}) to perform these writebacks efficiently when software can ensure exclusive
write access to the block being flushed. Using these ASIs, software can write back
data from the floating-point registers to memory and invalidate the entry in the
cache. The data in the floating-point registers must first be loaded by a block load
instruction. A MEMBAR
#Sync
instruction is needed to ensure that the flush is
complete. See also Section 13.6.4, “Block Load and Store Instructions,” on page
230.
5.2.3 Displacement Flushing
Cache flushing also can be accomplished by a displacement flush. This is done by
reading a range of read-only addresses that map to the corresponding cache line
being flushed, forcing out modified entries in the local cache. Care must be taken
to ensure that the range of read-only addresses is mapped in the MMU before
starting a displacement flush, otherwise the TLB miss handler may put new data
into the caches.
Note:
Diagnostic ASI accesses to the E-Cache can be used to invalidate a line,
but they are generally not an alternative to displacement flushing. Modified data
in the E-Cache will not be written back to memory using these ASI accesses. See
Section A.9, “E-Cache Diagnostics Accesses,” on page 315.
5.3 Memory Accesses and Cacheability
Note:
Atomic load-store instructions are treated as both a load and a store; they
can be performed only in cacheable address spaces.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com