1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:07:36 +00:00
serenity/Kernel/Arch/riscv64/CPU.h
Hendiadyoin1 3941277940 Kernel/riscv64: Get the kernel command line from the device tree
This also hides the fdt dump by default now,
it can be activated by adding `dump_fdt` to the kernel command line
2024-02-24 16:43:44 -07:00

32 lines
731 B
C++

/*
* Copyright (c) 2023, Sönke Holz <sholz8530@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <Kernel/Memory/PhysicalAddress.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <LibDeviceTree/DeviceTree.h>
#include <AK/Platform.h>
VALIDATE_IS_RISCV64()
namespace Kernel {
constexpr size_t fdt_storage_size = 2 * MiB;
extern u8 s_fdt_storage[fdt_storage_size];
// FIXME: These should move to an architecture independent location,
// once we need device tree parsing in other architectures, like aarch64
extern BootInfo s_boot_info;
ErrorOr<void> unflatten_fdt();
void dump_fdt();
ErrorOr<StringView> get_command_line_from_fdt();
}
namespace DeviceTree {
DeviceTree const& get();
}