
User’s Manual
IBM PowerPC 750GX and 750GL RISC Microprocessor
9.6.1.1 Loading the Locked L2 CacheContents are loaded into the L2 cache simply by executing load instructions to cacheable addresses that miss in the L1. Note that instructions to be locked in the L2 cache are loaded as data. Only one access to each
Note: While lines are being allocated in way 0 using this procedure, the cache behaves as a
In addition to the constraint imposed by the cache associativity, it is important while loading the contents to be locked that no spurious lines are allocated. The use of the ‘data only’ mode prevents the current instruction stream from being allocated. To prevent unwanted data from being allocated, the load sequence must either avoid using other data (for example, by using immediate fields in the instructions to specify load addresses) or must prevent that data from colliding with other data or instructions to be allocated (for example, by allocating it explicitly as part of the data to be locked).
The contents of the locked cache cannot be deallocated implicitly under normal conditions (see the exceptions for snoops and stwcx. marked write through described above), but can be deallocated by the processor using a dcbi instruction, as described below.
9.6.1.2 Locked Cache OperationWhen one or more ways of the L2 cache are locked, the locked ways behave like the normal (unlocked) cache except in the following situations:
Replacement never occurs in the locked cache. If one way is locked, an L2 miss causes replacement in one of the unlocked ways of the cache by the new block of data or instructions received from the bus (or from the L1 cache in the case of a castout). If all ways are locked, an L2 miss causes the new block of data or instructions from the bus to be forwarded to the L1 cache without updating the L2. In the case of a castout that misses in a completely locked L2, the data is forwarded to the bus from the L1 without updating the L2. Although the locked cache is not kept coherent with main memory in general, a store access marked
An stwcx. marked
A dcbst instruction is used to update external memory with the more recent contents of the internal cache. A dcbf instruction also does this, while invalidating the internal copy. A dcbf or dcbst that hits in the locked cache modifies the locked cache with the castout block if it hit in the L1 cache, but does nothing if it missed in the L1 cache (the corresponding behavior for a hit in the normal L2 cache is to invalidate the block if the access hit in the L1, and to flush the block if it missed in the L1).
gx_09.fm.(1.2) | L2 Cache |
March 27, 2006 | Page 331 of 377 |