mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:07:34 +00:00
Kernel: Use new halt() for all our halting needs in aarch64 Prekernel
This commit is contained in:
parent
0319aa315a
commit
3a24eb323f
2 changed files with 5 additions and 7 deletions
|
@ -12,7 +12,7 @@ start:
|
|||
// Let only core 0 continue, put other cores to sleep.
|
||||
mrs x13, MPIDR_EL1
|
||||
and x13, x13, 0xff
|
||||
cbnz x13, Lhalt
|
||||
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,
|
||||
|
@ -21,7 +21,3 @@ start:
|
|||
mov sp, x14
|
||||
|
||||
b init
|
||||
|
||||
Lhalt:
|
||||
wfi
|
||||
b Lhalt
|
||||
|
|
|
@ -7,12 +7,14 @@
|
|||
#include <AK/Types.h>
|
||||
#include <Kernel/Prekernel/Arch/aarch64/MainIdRegister.h>
|
||||
|
||||
extern "C" [[noreturn]] void halt();
|
||||
|
||||
extern "C" [[noreturn]] void init();
|
||||
extern "C" [[noreturn]] void init()
|
||||
{
|
||||
Prekernel::MainIdRegister id;
|
||||
[[maybe_unused]] unsigned part_num = id.part_num();
|
||||
for (;;) { }
|
||||
halt();
|
||||
}
|
||||
|
||||
// FIXME: Share this with the Intel Prekernel.
|
||||
|
@ -20,7 +22,7 @@ extern size_t __stack_chk_guard;
|
|||
size_t __stack_chk_guard;
|
||||
extern "C" [[noreturn]] void __stack_chk_fail();
|
||||
|
||||
[[noreturn]] static void halt()
|
||||
[[noreturn]] void halt()
|
||||
{
|
||||
for (;;) {
|
||||
asm volatile("wfi");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue