This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Setting breakpoints at runtime and stepping on the Cortex A53.

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.

Parents
  • For aarch32,

    AArch32


    P1
    STR R11, [R1] ; R11 contains a new instruction to be stored in program memory
    DCCMVAU R1 ; clean to PoU makes the new instruction visible to the instruction cache
    DSB ; ensures completion of the clean on all PEs
    ICIMVAU R1 ; ensures instruction cache discards stale data
    BPIMVA R ; ensures branch predictor discards stale data
    DSB ; ensures completion of the instruction cache and branch predictor
    ; invalidation on all PEs
    STR R0, [R2] ; sets flag to signal completion
    ISB ; synchronizes context on this PE
    BX R1 ; branches to new code


    P2-Px
    WAIT ([R2] == 1) ; waits for flag signalling completion
    ISB ; synchronizes context on this PE
    BX R1 ; branches to new code

Reply
  • For aarch32,

    AArch32


    P1
    STR R11, [R1] ; R11 contains a new instruction to be stored in program memory
    DCCMVAU R1 ; clean to PoU makes the new instruction visible to the instruction cache
    DSB ; ensures completion of the clean on all PEs
    ICIMVAU R1 ; ensures instruction cache discards stale data
    BPIMVA R ; ensures branch predictor discards stale data
    DSB ; ensures completion of the instruction cache and branch predictor
    ; invalidation on all PEs
    STR R0, [R2] ; sets flag to signal completion
    ISB ; synchronizes context on this PE
    BX R1 ; branches to new code


    P2-Px
    WAIT ([R2] == 1) ; waits for flag signalling completion
    ISB ; synchronizes context on this PE
    BX R1 ; branches to new code

Children