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: Trustzones: switching between secure/normal worlds - ARM Community

Jump to content

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

Trustzones: switching between secure/normal worlds Rate Topic: -----

#1 User is offline   Nuno 

  • Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 26-June 10

Posted 10 August 2010 - 01:40 AM

Hi

I'm implementing a software component running in monitor mode for switching between secure and normal worlds. To isolate both worlds I have to ensure that the processor state of each world is properly preserved and restored upon switch, and for that I need to have access to all the core registers of the processor, including the banked registers.

My question is: while running in the monitor mode, how can address the banked registers of all the other privileged modes (svc, abort, undef, irq, fiq) for read/write (e.g., SP_svc, LR_svc, SPSR_svc)? I think it's possible to access the User banked registers using the caret modifier (e.g., 'STM sp, <register list>^'), but I couldn't find an answer regarding the other modes.

I'd really appreciate some help on this.

Thanks,
Nuno
0

#2 User is offline   ttfn 

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

Posted 10 August 2010 - 07:54 AM

You could just switch mode using the CPS instruction. As long as the SCR.NS bit is clear you will remain in the Secure world, and thus be able to switch back into Monitor mode.
0

Share this topic:


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