QTechOS/kernel/drivers/opensbi/include/opensbi.h
Quantum d5d92555ae
Drivers: Started OpenSBI driver
Just ecall wrapper for now

TODO: Build system changes are lazy and need to be figured out

TODO: Looks like kernel.cpp was indented with tabs, fix
2022-01-05 02:47:30 -05:00

62 lines
1.4 KiB
C++

#pragma once
typedef unsigned long uintmax_t;
namespace drivers {
namespace opensbi {
// We use uintmax_t to make sure this works on 32 and 64 bit
// At least thats how I hope this works..
// TODO: Add assert() to make sure this is the case
struct sbiret_t {
uintmax_t error;
uintmax_t value;
};
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0,
uintmax_t a1,
uintmax_t a2,
uintmax_t a3,
uintmax_t a4,
uintmax_t a5);
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0,
uintmax_t a1,
uintmax_t a2,
uintmax_t a3,
uintmax_t a4);
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0,
uintmax_t a1,
uintmax_t a2,
uintmax_t a3);
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0,
uintmax_t a1,
uintmax_t a2);
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0,
uintmax_t a1);
sbiret_t call(
uintmax_t extension,
uintmax_t function,
uintmax_t a0);
} // End namespace opensbi
} // End namespace drivers