Login

Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.

ARM Community: Cortex-A9 cant enter monitor mode - ARM Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cortex-A9 cant enter monitor mode Rate Topic: **--- 1 Votes

#1 User is offline   EmbSeb 

  • Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 14-October 11

Posted 20 July 2012 - 01:49 PM

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
0

#2 User is offline   isogen74 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 1098
  • Joined: 20-March 07

Posted 20 July 2012 - 01:58 PM

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

This post has been edited by isogen74: 20 July 2012 - 01:58 PM

When optimizing software, consider that the quickest code to run is the bit you removed from the call path.
1

#3 User is offline   ttfn 

  • Super Contributor
  • PipPipPipPip
  • Group: Members
  • Posts: 576
  • Joined: 29-September 06

Posted 20 July 2012 - 02:07 PM

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.
1

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic