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

Cortex-A53 switching from EL2 to EL1

Hi,

I trying to switch from EL2 to EL1 on Cortex-A53. But it doesn't work.

Here is my current startup code:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <asm.h>
IMPORT_ASM(_cpu_el3_vec_tbl_set)
IMPORT_ASM(_cpu_el2_vec_tbl_set)
IMPORT_ASM(_cpu_el1_vec_tbl_set)
IMPORT_C(init)
IMPORT_C(main)
.text
ENTRY(_start)
mrs x0, MPIDR_EL1
and x0, x0, #0x3
cmp x0, #0
beq __elx
__wfe_cpu1_3:
wfe
b __wfe_cpu1_3
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

When I comment out from label __elx to __el1 everything works (the C functions init and main are called).

I also setup a vector table and handlers for EL2 and EL1. But there is no exception.

I have no idea what's going wrong.

What's the correct way change to a lower exception level?

0