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

Cortex-A9 cant enter monitor mode

Note: This was originally posted on 20th July 2012 at http://forums.arm.com

Hi,

I am using pandaboard with Cortex-A9MP (2x Cortex-A9) and connect to processor_0 by JTAG and Lauterbach hardware debugger.
When i try to change from system mode to monitor mode by change of CPSR mode bits, i get an debugger error "Emulator function blocked by device security".
When i execute the ARM instruction "smc 1", nothing happens.
The "Secure Configuration Register" and "Secure Debug Enable Register" cannot be read and are marked as "???????" by the debugger, which indicates i am in non-secure mode.

My question: What might block monitor mode access?

Greets
Sebastian
  • Note: This was originally posted on 20th July 2012 at http://forums.arm.com

    It sounds like the the secure-world debug has been disabled, so JTAG is restricted to doing "normal world" workloads. The "approved" approach of entering monitor mode is to use the SMC instruction, and so this should still work (although if secure debug has been disabled you won't be able to see anything happening, you'll just reappear in the normal world some time later.

    Iso
  • Note: This was originally posted on 20th July 2012 at http://forums.arm.com

    The A9 doesn't (AFAIK) have an option to completely disable the Secure world.  However, you can disable Secure debug - which would prevent you switching to Mon mode through the debugger.  You can't do it from code either, as while in the Normal world you can't manually set the CPSR to Mon mode or access any of the Secure only CP15 regs.

    In terms of the SMC #1 instruction doing nothing - I'm pretty sure it doesn't exactly what it is meant to.  Sets off a SMC exception, triggering an entry to Mon mode.  It is just the handler is doing an immediate (or almost immediate) return - so you end up back where you started.  And you can't see this happening because Secure debug is disabled.  You could prove this to yourself by looking at the CCNT to see if time has elapsed.

    More generally, it is quite rare to get access to the Secure world on the easily available commercial dev boards.