Armv7-a TrustZone cps instruction Question

Hi, When I attempt to run arm-trusted-firmware on a Cortex-A7 processor with security extensions, the assembly instruction "cps #22" is executed, and then the processor's r8-lr registers become 0xdeadbeef. Is this the correct behavior of the processor? If not, what could be wrong here?


Parents
  • What I'm trying to figure out is what the start and end modes are - can you confirm those from the CPSR?

    The easiest explanation for r8-r12 appearing to change on a mode switch is that you have changed to or changed from FIQ mode - as FIQ mode has it's own banked copy of those registers.  Therefore if you switch into or out of FIQ mode, it'll appear as if r8-r12 changed value because you're now seeing different values.  So I'm interested in what mode the processor was in when the CPS instruction get executed and what mode the processor is in after the CPS when you look at the regs in the debugger.  

Reply
  • What I'm trying to figure out is what the start and end modes are - can you confirm those from the CPSR?

    The easiest explanation for r8-r12 appearing to change on a mode switch is that you have changed to or changed from FIQ mode - as FIQ mode has it's own banked copy of those registers.  Therefore if you switch into or out of FIQ mode, it'll appear as if r8-r12 changed value because you're now seeing different values.  So I'm interested in what mode the processor was in when the CPS instruction get executed and what mode the processor is in after the CPS when you look at the regs in the debugger.  

Children
No data