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

GNU Toolchain - Unknown or missing system register (GIC register - Cortex-A53)

I have started a simple bare-metal project for the Cortex-A53. Now I want to implement interrupt handling, but run into an issue with the toolchain.

Want to read out and write into the ICC_x registers, but get the following error message from GAS:

Fullscreen
1
2
3
4
5
6
7
8
$ make
aarch64-suse-linux-gcc -c -Wall -I ./include -ffreestanding -mcpu=cortex-a53 misc.S -o misc.o
misc.S: Assembler messages:
misc.S:38: Error: unknown or missing system register name at operand 2 -- `mrs x0,ICC_SRE_EL2'
misc.S:42: Error: unknown or missing system register name at operand 2 -- `mrs w0,ICC_SRE_EL2'
misc.S:44: Error: unknown or missing system register name at operand 1 -- `msr ICC_SRE_EL2,w0'
misc.S:48: Error: unknown or missing system register name at operand 2 -- `mrs x0,ICC_SRE_EL2'
misc.S:50: Error: unknown or missing system register name at operand 2 -- `mrs x0,ICC_SRE_EL2'
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The 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>
#define ICC_SRE_EL2_FIQ 0x2
#define ICC_SRE_EL2_IRQ 0x4
.text
FUNCTION(_cpu_get_el)
mrs x0, CurrentEL
and x0, x0, #0xC
asr x0, x0, #2
ret
FUNCTION(_cpu_get_id)
mrs x0, MPIDR_EL1
and x0, x0, #0x3
ret
FUNCTION(_cpu_get_icc_sre_el2)
mrs x0, ICC_SRE_EL2
ret
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Is something missing?

I compile with the folllowing options.

-Wall -I ./include -ffreestanding -mcpu=cortex-a53 -Wa,-mcpu=cortex-a53



0