User Manual
BCM1250/BCM1125/BCM1125H
10/21/02
B r o a d c o m C o r p o r a t i o n
Document
1250_1125-UM100CB-R
Section 5: L2 Cache
Page
99
C
ACHE
C
ONFIGURATION
R
EGISTER
There is a 4 bit register
l2_misc_config
that can be used to modify the L2 behavior. It is similar to the
l2_way_enable
register in that it is hidden and written from address bits. In most systems this register should
not be modified. The register is accessed by writing dummy data to address
00_10043r00.
Bits 8 and 9 are
reserved and should be written as zero. If bit 10 is set the L2 cache will use the low priority memory controller
blocker rather than the high priority one. If bit 11 is set the automatic ECC cleanup is disabled. On parts with
system revision indicating PERIPH_REV3 and later the register can be read back from the
l2_misc_value
register.
E
XAMPLE
S
TARTUP
C
ODE
TO
CLEAR
THE
L2 C
ACHE
The following code will work on the BCM1250 and BCM1125/H using 4096 sets. It could be optimized for the
BCM1125/H to only clear 2048 sets.
# Save the old status register, and set the KX bit.
# This allows 64 bit addressing through xkphys.
mfc0
t2,C0_SR
or
t1,t2,M_SR_KX
mtc0
t1,C0_SR
# Start the index at the base of the cache management
# area, but leave the address bit for "Valid" zero.
# Note that the management tags are at 00_D000_0000,
# which cannot be accessed through kseg1,
# so generate a 64-bit xkphys uncacheable address to get to it.
# The PHYS_TO_XKPHYS mapping adds 9000_0000_0000_0000 to the address
dli
t0,PHYS_TO_XKPHYS(A_L2C_MGMT_TAG_BASE)
# Loop through each entry (4096) and each way (4)
li
t1,L2C_ENTRIES_PER_WAY*L2C_NUM_WAYS
# Write a zero to the cache management register at each
# address. Align and do four per loop to run faster since the code
# is running in uncached space.
.align 4
1:
sd
zero,0(t0)
sd
zero,CACHE_LINE_SIZE(t0)
sd
zero,2*CACHE_LINE_SIZE(t0)
sd
zero,3*CACHE_LINE_SIZE(t0)
daddu
t0,(4*CACHE_LINE_SIZE) # size of a cache line
subu
t1,4
bne
t1,0,1b
#
# Restore old KX bit setting
#
mtc0
t2,C0_SR
j
ra
# return to caller
Содержание BCM1125
Страница 18: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xviii Document 1250_1125 UM100CB R ...
Страница 28: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page xxviii Document 1250_1125 UM100CB R ...
Страница 515: ...BCM1250 BCM1125 BCM1125H User Manual 10 21 02 Broadcom Corporation Page vii Index Document 1250_1125 UM100CB R ...