1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 18:17:44 +00:00

Kernel: Use new halt() for all our halting needs in aarch64 Prekernel

This commit is contained in:
Nico Weber 2021-09-17 10:51:13 -04:00 committed by Linus Groh
parent 0319aa315a
commit 3a24eb323f
2 changed files with 5 additions and 7 deletions

View file

@ -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");