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
92
Section 5: L2 Cache
Document
1250_1125-UM100CB-R
S
TANDARD
RAM
Ways removed from the L2 cache can be used as a standard RAM block by accessing the memory using the
management access address range with the way bits set appropriately and the special control bits set to zero
(the management mode is described in
Section: “Cache Management Access” on page 94
). This provides a
bank of memory that the system will need to initialize and that has no corresponding main memory locations.
If consecutive ways are removed from the L2 cache the banks provided will be contiguous, forming a larger
memory.
shows the address range that should be used for each RAM bank. Note that special
management accesses can be invoked by using addresses other than those listed, potentially corrupting the
data.
gives details on how these addresses were derived. The special ECC diagnostic mode
bits are clear, the valid and dirty bits are set and the way bits match the desired way. Bits [26:23] are ignored
by the access (although they get written to the cache tag), so there are 15 aliases to the addresses in
that will work equally well.
M
EMORY
L
OCKED
IN
THE
L2 C
ACHE
The second method for using the L2 cache as a controlled memory is to lock data into it. The L2 is initialized
with the data from main memory before the way is removed from the replacement algorithm, then any accesses
to those main memory addresses will always access the L2 cache. This scheme is more complicated to set up
and care must be taken that the addresses to be locked do not collide in the cache (since only one way is being
locked only one address can be used per cache index), however it may be useful for code or data that cannot
be easily relocated.
One method to initialize the cache is to ensure there are no copies of the code in L1 or L2 caches (since the
initialization would most likely run as the system boots, it may be possible to arrange this by design). Three
ways of the L2 cache are then disabled and cacheable reads are used to fetch the code or data into the fourth
way. Once the data is in place the three ways are enabled and the fourth way disabled, locking the data in the
cache. As with any L2 cache manipulation, care must be taken to ensure that there is no other activity in the
system during this process.
Table 53: Addresses for Memory Banks
Way
Base
End (for 512KB cache)
End (for 256KB cache)
0
00_D018_0000
00_D019_FFFF
00_D018_FFFF
1
00_D01A_0000
00_D01B_FFFF
00_D01A_FFFF
2
00_D01C_0000
00_D01D_FFFF
00_D01C_FFFF
3
00_D01E_0000
00_D01F_FFFF
00_D01E_FFFF