I am upgrading my operating system to Raspberry Pi 3B, the Cortex A53 processor. I am having trouble with the step command in my debugger. It appears that swapping the breakpoint instruction and the instruction it is placed on are not making it into the instruction cache. I tried the isb and dsp instructions to flush the cache, but this had no effect.
For aarch32,
AArch32
P1STR R11, [R1] ; R11 contains a new instruction to be stored in program memoryDCCMVAU R1 ; clean to PoU makes the new instruction visible to the instruction cacheDSB ; ensures completion of the clean on all PEsICIMVAU R1 ; ensures instruction cache discards stale dataBPIMVA R ; ensures branch predictor discards stale dataDSB ; ensures completion of the instruction cache and branch predictor; invalidation on all PEsSTR R0, [R2] ; sets flag to signal completionISB ; synchronizes context on this PEBX R1 ; branches to new code
P2-PxWAIT ([R2] == 1) ; waits for flag signalling completionISB ; synchronizes context on this PEBX R1 ; branches to new code
Thanks! That worked.
I'm glad that it worked.