.section .head,"ax" .global _image_start _image_start: b _start .word 0 .quad 0x80000 .quad _image_end - _image_start .quad 0x2 .quad 0 .quad 0 .quad 0 .word 0x644d5241 .word 0 .section .text.boot,"ax" .global _start _start: msr daifset, #0xf mov x20, x1 mrs x1, mpidr_el1 and x1, x1, #0xff cbnz x1, .Lpark mov x19, x0 // Rust may use Advanced SIMD even for integer/array operations. Enable it // before entering compiled code; IRQs remain masked and there are no tasks. mrs x1, CurrentEL cmp x1, #4 b.eq .Lenable_el1_simd cmp x1, #8 b.eq .Lenable_el2_simd b .Lpark .Lenable_el1_simd: mrs x1, CPACR_EL1 orr x1, x1, #(3 << 20) msr CPACR_EL1, x1 isb b .Lsimd_ready .Lenable_el2_simd: mrs x1, CPTR_EL2 bic x1, x1, #(1 << 10) msr CPTR_EL2, x1 isb .Lsimd_ready: adrp x1, __bss_start add x1, x1, :lo12:__bss_start adrp x2, __bss_end add x2, x2, :lo12:__bss_end .Lzero_bss: cmp x1, x2 b.hs .Lstack str xzr, [x1], #8 b .Lzero_bss .Lstack: adrp x1, __stack_top add x1, x1, :lo12:__stack_top mov sp, x1 mov x0, x19 mov x1, x20 bl kernel_main .Lpark: wfe b .Lpark .section .bss.stack,"aw",%nobits .align 12 .global __stack_start __stack_start: .skip 16384 .global __stack_top __stack_top: // Isolated return-path experiment stack. The low guard is initialized and // checked by Rust; the vector itself always switches away from the boot stack. .section .bss.irq_stack,"aw",%nobits .align 12 .global __irq_guard_page_start __irq_guard_page_start: .skip 4096 .global __irq_stack_guard __irq_stack_guard: .skip 16 .global __irq_stack_start __irq_stack_start: .skip 16384 .global __irq_stack_top __irq_stack_top: