mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:37:35 +00:00
Kernel: Let aarch64 port call into C++
Put all but the first core into a loop, make room for some stack, and call init().
This commit is contained in:
parent
f1d1418256
commit
62bc238ac3
3 changed files with 24 additions and 1 deletions
|
@ -9,7 +9,18 @@
|
|||
.global start
|
||||
.type start, @function
|
||||
start:
|
||||
b Lhalt
|
||||
// Let only core 0 continue, put other cores to sleep.
|
||||
mrs x13, MPIDR_EL1
|
||||
and x13, x13, 0xff
|
||||
cbnz x13, Lhalt
|
||||
|
||||
// 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
|
||||
|
||||
Lhalt:
|
||||
wfi
|
||||
|
|
11
Kernel/Prekernel/Arch/aarch64/init.cpp
Normal file
11
Kernel/Prekernel/Arch/aarch64/init.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
extern "C" [[noreturn]] void init();
|
||||
extern "C" [[noreturn]] void init()
|
||||
{
|
||||
for (;;) { }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue