aboutsummaryrefslogtreecommitdiff
path: root/src/arch/riscv/mcall.c
diff options
context:
space:
mode:
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>2017-11-20 00:57:32 +0100
committerMartin Roth <martinroth@google.com>2017-12-02 05:24:32 +0000
commit3ca8b598ed4ea16fd55d0d8108749c1da537a036 (patch)
tree36f54ae9d8b69088e60c51331ca02d98b0b96ece /src/arch/riscv/mcall.c
parentb0de851ebb032bd1517790b1c07d408d84e82f94 (diff)
arch/riscv: Remove the current SBI implementation
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 <j.neuschaefer@gmx.net> Reviewed-on: https://review.coreboot.org/22593 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/arch/riscv/mcall.c')
-rw-r--r--src/arch/riscv/mcall.c61
1 files changed, 0 insertions, 61 deletions
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 <arch/barrier.h>
#include <arch/errno.h>
#include <atomic.h>
-#include <commonlib/configstring.h>
#include <console/console.h>
#include <mcall.h>
#include <string.h>
@@ -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;
-}