63 lines
1.4 KiB
C
63 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
|