/* * Copyright (c) 2021, James Mintram * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include 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"); } } }