One of the most important features of Armv8-A is exception levels (ELs), as exception handling and registers are organized based on exception level.
Exception levels and privilege levels
What is an exception level? When you look into the Linux kernel or RTOS code, you will notice that several system registers are suffixed with EL1
or EL2
:
01 MSR TTBR0_EL1, X1
02 ADD X0, X0, #0x800
03 MSR VBAR_EL2, X1
The preceding example shows that TTBR0_EL1
is suffixed with EL1
in line 01, and VBAR_EL2
is suffixed with EL2
in line 03.
In practice, an exception level is written as ELn
or ELx
, where the n
or x
characters are suffixed to EL
and the value of n
or x
can range from 0
to 3
. EL0
is called exception level zero and EL1
is called exception level one.
When you hear about exception levels for the first time, you may assume the exception level is related to the exception, as the name implies. However, exception levels correspond to privilege levels rather...