1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2026-01-15 21:41:00 +00:00
serenity/Kernel/Prekernel/Arch/aarch64/boot.S

23 lines
503 B
ArmAsm

/*
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
.text
.global start
.type start, @function
start:
// Let only core 0 continue, put other cores to sleep.
mrs x13, MPIDR_EL1
and x13, x13, 0xff
cbnz x13, halt
// Let stack start before .text for now.
// 512 kiB (0x8000) of stack are probably not sufficient, especially once we give the other cores some stack too,
// but for now it's ok.
ldr x14, =start
mov sp, x14
b init