os-core/aarch64/boot.S

23 lines
262 B
ArmAsm

.global _boot
.extern k_main
_boot:
mrs x0, mpidr_el1 // Check CPU ID
mov x1, 0xC1000000
bic x0, x0, x1
cbz x0, set_stack
b idle
set_stack:
ldr x30, =0x40001000
mov sp, x30
bl start
start:
mov x0, x30
bl k_main
idle: b idle