Disabling The Instruction Cache On The Powerpc - HP E2465A PowerPC 604 PGA User Manual

Preprocessor interface
Table of Contents

Advertisement

Disabling the Instruction Cache on the
Power PC
When the instruction cache is enabled, many Power PC instructions
are executed from the cache and do not appear on the external bus.
To get an execution trace on the bus, the instruction cache can be
disabled. This must be done in supervisor mode.
• Disable the cache with the following code:
mfspr
r3 hidO
rlwinm r3 r3 0 17 15 #clear bit 16 (ICE)
mtspr
hidO r3
isync
• To also disable the data cache use:
mfspr
r3 hidO
rlwinm r3 r3 0 18 15 # clear ICE and DCE
mtspr
hidO r3
isync
• To invalidate and disable the caches use:
mfspr
r3 hidO
ori
r3 OCOO
# set ICFI and DCFI
mtspr
hidO r3
rlwinm r3 r3 0 22 19 #clear ICFI and DCFI
mtspr
hidO r3
rlwinm r3 r3 0 18 15 #clear ICE and DCE
mtspr
hidO r3
isync
2-24
E2465A PowerPC 604 PGA Preprocessor

Advertisement

Table of Contents
loading

Table of Contents