summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2018-12-11 17:53:17 +0100
committerPatrick Georgi <pgeorgi@google.com>2018-12-19 05:44:29 +0000
commitecf25fda862072c17701cd50bf233040ec210f4b (patch)
treef134fef0bbacd99f7b8d18d1d04908aeebe1516c /src/arch
parent7d81718cb863fd5d16e31c7fef203d5f63c87c97 (diff)
downloadcoreboot-ecf25fda862072c17701cd50bf233040ec210f4b.tar.xz
arch/riscv: Define and use SBI_ENOSYS
Change-Id: Ia7f409ebc7e50383a7e445ef8806953347501dab Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/c/30175 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Philipp Hug <philipp@hug.cx>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/riscv/include/sbi.h2
-rw-r--r--src/arch/riscv/sbi.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/riscv/include/sbi.h b/src/arch/riscv/include/sbi.h
index e9301f630c..2943704a84 100644
--- a/src/arch/riscv/include/sbi.h
+++ b/src/arch/riscv/include/sbi.h
@@ -26,6 +26,8 @@
#define SBI_REMOTE_SFENCE_VMA_ASID 7
#define SBI_SHUTDOWN 8
+#define SBI_ENOSYS 38
+
#define IPI_SOFT 1
#define IPI_FENCE_I 2
#define IPI_SFENCE_VMA 4
diff --git a/src/arch/riscv/sbi.c b/src/arch/riscv/sbi.c
index 832d4d3d97..e5408288af 100644
--- a/src/arch/riscv/sbi.c
+++ b/src/arch/riscv/sbi.c
@@ -113,7 +113,7 @@ void handle_sbi(trapframe *tf)
ret = send_ipi((uintptr_t *)arg0, IPI_SHUTDOWN);
break;
default:
- ret = -38;
+ ret = -SBI_ENOSYS;
break;
}
tf->gpr[10] = ret;