summaryrefslogtreecommitdiff
path: root/src/arch/riscv/include
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2016-08-22 19:37:16 +0200
committerRonald G. Minnich <rminnich@gmail.com>2016-08-23 23:47:01 +0200
commit857e33e27f1feeec328ae8be5ad61ee51b75e4ec (patch)
treedd743b4fda0ac4c6f485e56a982fbc50932a4e42 /src/arch/riscv/include
parent3965a522c23ea50b1a861b89a8215a524caa35f7 (diff)
arch/riscv: Implement the SBI again
Not all SBI calls are implemented, but it's enough to see a couple dozen lines of Linux boot output. It should also be noted that the SBI is still in flux: https://groups.google.com/a/groups.riscv.org/forum/#!topic/sw-dev/6oNhlW0OFKM Change-Id: I80e4fe508336d6428ca7136bc388fbc3cda4f1e4 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/16119 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/riscv/include')
-rw-r--r--src/arch/riscv/include/arch/sbi.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/arch/riscv/include/arch/sbi.h b/src/arch/riscv/include/arch/sbi.h
new file mode 100644
index 0000000000..df7f6cc70e
--- /dev/null
+++ b/src/arch/riscv/include/arch/sbi.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2016 Jonathan Neuschäfer <j.neuschaefer@gmx.net>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+
+#ifndef _ARCH_SBI_H
+#define _ARCH_SBI_H
+
+#define SBI_ECALL_HART_ID 0
+#define SBI_ECALL_CONSOLE_PUT 1
+#define SBI_ECALL_SEND_DEVICE_REQUEST 2
+#define SBI_ECALL_RECEIVE_DEVICE_RESPONSE 3
+#define SBI_ECALL_SEND_IPI 4
+#define SBI_ECALL_CLEAR_IPI 5
+#define SBI_ECALL_SHUTDOWN 6
+#define SBI_ECALL_SET_TIMER 7
+#define SBI_ECALL_QUERY_MEMORY 8
+#define SBI_ECALL_NUM_HARTS 9
+
+#ifndef __ASSEMBLY__
+struct opaque;
+extern struct opaque sbi_page;
+#endif
+
+#endif