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,
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.
source
share