From 3ca8b598ed4ea16fd55d0d8108749c1da537a036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= Date: Mon, 20 Nov 2017 00:57:32 +0100 Subject: arch/riscv: Remove the current SBI implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This Supervisor Binary Interface, which is based on a page of code that's provided to operating systems by the M-mode software, has been superseded by a different (currently not really documented) SBI, which is based on directly executing ECALLs instructions. Thus some of our code becomes obsolete. Just rip it out until we implement the new SBI. Change-Id: Iec9c20b750f39a2b8f1553e25865bbf150605a6d Signed-off-by: Jonathan Neuschäfer Reviewed-on: https://review.coreboot.org/22593 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/riscv/mcall.c | 61 -------------------------------------------------- 1 file changed, 61 deletions(-) (limited to 'src/arch/riscv/mcall.c') diff --git a/src/arch/riscv/mcall.c b/src/arch/riscv/mcall.c index 111cb64b44..030accfe1d 100644 --- a/src/arch/riscv/mcall.c +++ b/src/arch/riscv/mcall.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,60 +35,6 @@ int mcalldebug; // set this interactively for copious debug. -uintptr_t mcall_query_memory(uintptr_t id, memory_block_info *info) -{ - if (id == 0) { - uintptr_t base; - size_t size; - - query_mem(configstring(), &base, &size); - - mprv_write_ulong(&info->base, base); - mprv_write_ulong(&info->size, size); - return 0; - } - - return -1; -} - -uintptr_t mcall_send_ipi(uintptr_t recipient) -{ - die("mcall_send_ipi is currently not implemented"); - return 0; -} - -uintptr_t mcall_clear_ipi(void) -{ - // only clear SSIP if no other events are pending - if (HLS()->device_response_queue_head == NULL) { - clear_csr(mip, MIP_SSIP); - /* Ensure the other hart sees it. */ - mb(); - } - - return atomic_swap(&HLS()->ipi_pending, 0); -} - -uintptr_t mcall_shutdown(void) -{ - die("mcall_shutdown is currently not implemented"); - return 0; -} - -uintptr_t mcall_set_timer(uint64_t when) -{ - uint64_t *timecmp = HLS()->timecmp; - - if (mcalldebug) - printk(BIOS_SPEW, - "hart %d: HLS %p: mcall timecmp@%p to 0x%llx\n", - HLS()->hart_id, HLS(), timecmp, when); - *timecmp = when; - clear_csr(mip, MIP_STIP); - set_csr(mie, MIP_MTIP); - return 0; -} - void hls_init(uint32_t hart_id) { printk(BIOS_SPEW, "hart %d: HLS is %p\n", hart_id, HLS()); @@ -103,9 +48,3 @@ void hls_init(uint32_t hart_id) printk(BIOS_SPEW, "Time is %p and timecmp is %p\n", HLS()->time, HLS()->timecmp); } - -uintptr_t mcall_console_putchar(uint8_t ch) -{ - do_putchar(ch); - return 0; -} -- cgit v1.2.3