1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:24:58 +00:00
serenity/Kernel/Arch/aarch64/PrekernelCommon.cpp
2022-04-01 21:24:45 +01:00

32 lines
501 B
C++

/*
* Copyright (c) 2021, James Mintram <me@jamesrm.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/aarch64/Prekernel.h>
#include <Kernel/Arch/aarch64/ASM_wrapper.h>
#include <Kernel/Arch/aarch64/UART.h>
namespace Prekernel {
[[noreturn]] void panic(char const* msg)
{
auto& uart = Prekernel::UART::the();
if (msg) {
uart.print_str(msg);
}
Prekernel::halt();
}
[[noreturn]] void halt()
{
for (;;) {
asm volatile("wfi");
}
}
}