User`s guide

B.11 Icache Flush Code
B.11 Icache Flush Code
The following code is loaded into memory after the system ROM image. The
code is then executed to flush the SROM initialization code from the Icache.
The SROM initialization code is loaded into the Icache and maps to memory
beginning at address zero.
77FF0119 mt r31, flushIc
C0000001 br r0, +4
.long destination
6C008000 ldl_p r0, 0x0 (r0)
47FF041F bis r31, 31, 31
47FF041F bis r31, 31, 31
.
. (total of 44 bis instructions)
.
47FF041F bis r31, 31, 31
47FF041F bis r31, 31, 31
6BE00000 jmp r31, (r0)
In an attempt to transfer execution to the first page in memory, execution
would continue in the SROM initialization code at that address. Therefore,
execution must be transferred to some address that does not hit in the Icache
where other code can flush the Icache.
The NOPs following the Icache flush allow the instructions that were fetched
before the Icache was updated to be cleared from the pipeline. Execution will
ultimately continue at the address contained in r0. At this point r0 contains
the starting address where the system flash ROM image was loaded into
memory.
B–16 SROM Initialization