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

Monitor stack  pointer configuration in non secure mode

Note: This was originally posted on 28th December 2011 at http://forums.arm.com

Hi

Please help me to understand whether the monitor stack pointer has to be configured in the non secure mode in the boot sequence.
I understand that all the other stack pointers(usr, svc, fiq ,irq ) has to be configured for the non secure area.

But should i configure the monitor stack pointer also in non secure mode????
Please help
  • Note: This was originally posted on 2nd January 2012 at http://forums.arm.com

    hi ...
    @something..
    Does this mean that I have to initialise a pointer for sp_mon register in non secure mode?
    I do understand that i have to initialise stack pointer fro monitor in secure mode....but when cpu in monitor mode goes from secure to non secure, do we have to separetely initialise    SP_MON  register in non sec mode?
  • Note: This was originally posted on 31st December 2011 at http://forums.arm.com

    monitor mode  SP is banked. That means you can only configure it in monitor mode.
    A only entry is  boot up.When booting,the arm is in secure mode,you must install your monitor code before you return non-secure mode.
    Otherwise, you can do nothing in secure mode.
  • Note: This was originally posted on 31st December 2011 at http://forums.arm.com

    Monitor mode is a secure mode, so you won't be able to set up the stack pointer =)
  • Note: This was originally posted on 3rd January 2012 at http://forums.arm.com

    Simple answer is - no.

    You have a "Secure Monitor" which is a bit of software responsible for switching between the Secure and Normal worlds.  The "Secure Monitor" software executes mainly in "Monitor mode".  When the processor is "Monitor mode" it is ALWAYS in the Secure world.

    To initialize any of the Monitor mode registers (lr_mon, sp_min, spsr_mon) you need to be in Monitor mode.  Whenever you are in Monitor mode you are in the Secure world.

    As something said, the boot code for the Secure world will be responsible for setting up Monitor mode/Secure Monitor.  The Normal world code should not need to do anything related to the Monitor.