(ARM ASSEMBLY) MSR CPSR_C, # 0x13 not working

I am writing empty metal code (without OS) for an ARM Cortex A9 processor.

I need to read the register, available only in supervisor mode (multiprocessor affinity register, MPIDR).

When I am in user mode and trying to execute the following command (to enter supervisor mode), nothing happens step by step with the debugger.

MSR CPSR_C, #0x13

And my program goes into undefined mode if I try to read the MPIDR register

Please know what I am missing?

When I use the debugger windows and force the first five bits of the CPSR register to b10011, it works, I go to the supervisor.

+4
source share
1 answer

, , CPSR . - svc ( ) .

+5

All Articles