aboutsummaryrefslogtreecommitdiff
path: root/src/arch/riscv/include
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2017-01-16 00:31:34 +0100
committerRonald G. Minnich <rminnich@gmail.com>2017-01-16 06:15:53 +0100
commitc5ebb1d005e1a176b94be136aa21734c03d34d08 (patch)
treee993aded5e50f5e109c4750e6f33c3b67d92dcc3 /src/arch/riscv/include
parentf676aa4afdadac5dce93ca10a9fe2c4d9ca4edfb (diff)
riscv: Move mcall numbers to mcall.h, adjust their names
The new name and location make more sense: - The instruction used to call into machine mode isn't called "ecall" anymore; it's mcall now. - Having SBI_ in the name is slightly wrong, too: these numbers are not part of the Supervisor Binary Interface, they are just used to forward SBI calls (they could be renumbered arbitrarily without breaking an OS that's run under coreboot). Also remove mcall_dev_{req,resp} and the corresponding mcall numbers, which are no longer used. Change-Id: I76a8cb04e4ace51964b1cb4f67d49cfee9850da7 Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/18146 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.h11
-rw-r--r--src/arch/riscv/include/mcall.h14
2 files changed, 14 insertions, 11 deletions
diff --git a/src/arch/riscv/include/arch/sbi.h b/src/arch/riscv/include/arch/sbi.h
index df7f6cc70e..4f0552193c 100644
--- a/src/arch/riscv/include/arch/sbi.h
+++ b/src/arch/riscv/include/arch/sbi.h
@@ -17,17 +17,6 @@
#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;
diff --git a/src/arch/riscv/include/mcall.h b/src/arch/riscv/include/mcall.h
index e303d0d28d..1e74ed345d 100644
--- a/src/arch/riscv/include/mcall.h
+++ b/src/arch/riscv/include/mcall.h
@@ -23,6 +23,20 @@
/* We save 37 registers, currently. */
#define MENTRY_FRAME_SIZE (HLS_SIZE + 37 * 8)
+#define MCALL_HART_ID 0
+#define MCALL_NUM_HARTS 1
+#define MCALL_QUERY_MEMORY 2
+#define MCALL_CONSOLE_PUTCHAR 3
+#define MCALL_CONSOLE_GETCHAR 4
+#define MCALL_SEND_IPI 6
+#define MCALL_CLEAR_IPI 7
+#define MCALL_SHUTDOWN 8
+#define MCALL_SET_TIMER 9
+#define MCALL_REMOTE_SFENCE_VM 10
+#define MCALL_REMOTE_FENCE_I 11
+#define MCALL_CONFIG_STRING_BASE 12
+#define MCALL_CONFIG_STRING_SIZE 13
+
#ifndef __ASSEMBLER__
#include <arch/encoding.h>