1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

Kernel: Move the aarch64 boot.S out of the Prekernel directory

This commit is contained in:
Timon Kruiper 2022-05-09 23:43:36 +02:00 committed by Linus Groh
parent e88cd338f1
commit c96a3f0c48
2 changed files with 1 additions and 2 deletions

View file

@ -0,0 +1,33 @@
/*
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
// In a specially-named text section so that the linker script can put it first in .text.
.section ".text.first"
.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, _ZN6Kernel9Processor4haltEv
// Let stack start before .text for now.
// 512 kiB (0x80000) of stack are probably not sufficient, especially once we give the other cores some stack too,
// but for now it's ok.
msr SPSel, #0 //Use the same SP as we descend into EL1
ldr x14, =start
mov sp, x14
// Clear BSS.
ldr x14, =start_of_bss
ldr x15, =size_of_bss_divided_by_8
Lbss_clear_loop:
str xzr, [x14], #8
subs x15, x15, #1
bne Lbss_clear_loop
b init