ladybird/Kernel/Arch/riscv64/pre_init.h
Sönke Holz 27860cfaa2 Kernel/riscv64: Add a basic trap handler to pre_init
This trap handler uses the SBI to print an error message via a newly
introduced panic function, which is necessary as `pre_init` is running
identity mapped.
Also add a header file for `pre_init.cpp` as we wan't to use the panic
and `dbgln` function in the MMU init code as well.
2024-01-12 16:46:46 -07:00

22 lines
431 B
C++

/*
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/Forward.h>
#include <Kernel/Memory/PhysicalAddress.h>
#include <AK/Platform.h>
VALIDATE_IS_RISCV64()
namespace Kernel {
void dbgln_without_mmu(StringView);
[[noreturn]] void panic_without_mmu(StringView);
extern "C" [[noreturn]] void pre_init(FlatPtr mhartid, PhysicalPtr fdt_phys_addr);
}