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>
This commit is contained in:
Jonathan Neuschäfer 2017-01-16 00:31:34 +01:00 committed by Ronald G. Minnich
commit c5ebb1d005
5 changed files with 29 additions and 46 deletions

View file

@ -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;

View file

@ -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>