diff options
author | Xiang W <wxjstz@126.com> | 2022-03-15 19:22:40 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-03-27 06:24:12 +0300 |
commit | d552fc8d369780150fd9837e1097b4b34a640d12 (patch) | |
tree | 85b1ef6933dcd2fffcbfbf2de537dbc862df2bc3 /lib/sbi | |
parent | b6b7220a47e19b422fb470cffb4675f0a70e94f3 (diff) | |
download | opensbi-d552fc8d369780150fd9837e1097b4b34a640d12.tar.xz |
lib: Add error messages via conditional compilation for the future
On 128-bit machines, sbi_load_xx/sbi_store_xx needs to be improved.
Through this conditional compile, the corresponding implementation
can be prompted to be added.
Signed-off-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/sbi')
-rw-r--r-- | lib/sbi/sbi_unpriv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sbi/sbi_unpriv.c b/lib/sbi/sbi_unpriv.c index 4246124..73b530c 100644 --- a/lib/sbi/sbi_unpriv.c +++ b/lib/sbi/sbi_unpriv.c @@ -83,7 +83,7 @@ DEFINE_UNPRIVILEGED_LOAD_FUNCTION(u32, lwu) DEFINE_UNPRIVILEGED_LOAD_FUNCTION(u64, ld) DEFINE_UNPRIVILEGED_STORE_FUNCTION(u64, sd) DEFINE_UNPRIVILEGED_LOAD_FUNCTION(ulong, ld) -#else +#elif __riscv_xlen == 32 DEFINE_UNPRIVILEGED_LOAD_FUNCTION(u32, lw) DEFINE_UNPRIVILEGED_LOAD_FUNCTION(ulong, lw) @@ -112,6 +112,8 @@ void sbi_store_u64(u64 *addr, u64 val, if (trap->cause) return; } +#else +# error "Unexpected __riscv_xlen" #endif ulong sbi_get_insn(ulong mepc, struct sbi_trap_info *trap) |