SWI interrupt (SVC) on ARM Cortex A9

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

Hi,
Right now I'm trying  to access some CP15 registers (ARM Cortex A9). And these registers can  be accessed only in privileged mode which is normal. Actually I dont  know how to change from user mode to svc mode easily. I read that we can  use SW interrupt but how can I attach my handler function to the SWI? can I just write to the address 0x08 the pointer to the handler?
Thanks for your time.
Parents
  • Note: This was originally posted on 9th February 2011 at http://forums.arm.com

    Pretty much.

    When execute an SVC instruction (SWI is the old name) the processor will switch to Supervisor mode, and branch to address 0x8*.  So at address 0x8 you need a branch to your handler code.


    * Technically it will be vector base address +0x8.  The default location is 0x0.
Reply
  • Note: This was originally posted on 9th February 2011 at http://forums.arm.com

    Pretty much.

    When execute an SVC instruction (SWI is the old name) the processor will switch to Supervisor mode, and branch to address 0x8*.  So at address 0x8 you need a branch to your handler code.


    * Technically it will be vector base address +0x8.  The default location is 0x0.
Children
No data
More questions in this forum