The CPU succesfully switches to EL1h, non-secure. But the el1_entry is never called. I don't know why. If using secure el1, the el1_entry gets called. Compiled using clang -c boot.S -o boot.o, and linked with ld. Any help would be appreciated.
global _Entry
_Entry:
mrs x0, scr_el3
orr x0, x0, #(1 << 10)
orr x0, x0, #(1 << 0)
msr scr_el3, x0
mov x0, #0b00101
msr spsr_el3, x0
adr x1, el1_entry
msr elr_el3, x1
eret
el1_entry:
ldr x15, =0xdeadbeef
b .
The code started working if i use an ELF file as parameter to the qemu -kernel option. Using binary version, the code doesn't works. I'm not a pro at this, so Any help about what i need to initialize when the CPU is brought out of reset would be fine.