os-core/aarch64/boot.s

26 lines
305 B
ArmAsm

.text
.globl _start
.extern k_main
.extern stack_ptr
_start:
mrs x0, mpidr_el1 // Check CPU ID
mov x1, 0xC1000000
bic x0, x0, x1
cbz x0, set_stack
b idle
set_stack:
ldr x30, stack_ptr // defined in sys/memmap
mov sp, x30
bl start
start:
mov x0, x30
bl k_main
idle:
b idle