aboutsummaryrefslogtreecommitdiff
path: root/include/arch/arch.h
blob: 406a2851895c462bf2e1457c7c05d9582c027c9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* SPDX-License-Identifier: GPL-3.0-or-later */
/* Copyright 2021 - 2022, Kim Kuparinen < kimi.h.kuparinen@gmail.com > */

#ifndef KMI_ARCH_H
#define KMI_ARCH_H

/**
 * @file arch.h
 * Arch-specific generic stuff, generally implemented in
 * arch/whatever/kernel/main.c
 */

#include <kmi/types.h>

#if defined(riscv64)
#include "../../arch/riscv64/include/arch.h"
#elif defined(riscv32)
#include "../../arch/riscv32/include/arch.h"
#endif

/**
 * Setup arch specific stuff.
 *
 * See arch documentation if there is any.
 *
 * @param fdt Global FDT.
 * @return \ref OK if boot can continue, error otherwise.
 * \todo Check errors.
 */
stat_t setup_arch(void *fdt);

#endif /* KMI_ARCH_H */