diff options
author | Jonathan Neuschäfer <j.neuschaefer@gmx.net> | 2017-11-20 00:57:32 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-12-02 05:24:32 +0000 |
commit | 3ca8b598ed4ea16fd55d0d8108749c1da537a036 (patch) | |
tree | 36f54ae9d8b69088e60c51331ca02d98b0b96ece /src/arch/riscv/sbi.S | |
parent | b0de851ebb032bd1517790b1c07d408d84e82f94 (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/sbi.S')
-rw-r--r-- | src/arch/riscv/sbi.S | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/src/arch/riscv/sbi.S b/src/arch/riscv/sbi.S deleted file mode 100644 index 608afc3baa..0000000000 --- a/src/arch/riscv/sbi.S +++ /dev/null @@ -1,119 +0,0 @@ -/* - * RISC-V supervisor binary interface (SBI) trampoline page - * - * Copyright 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. - */ - -#define __ASSEMBLY__ -#include <arch/encoding.h> -#include <mcall.h> - -.section ".text.sbi", "ax", %progbits - -/* align to a page boundary */ -.align RISCV_PGSHIFT - -.globl sbi_page -sbi_page: - - /* - * None of the SBI entry points is located in the first half of the - * page - */ - .skip 0x800 - - /* -2048: size_t sbi_hart_id(void); */ - li a7, MCALL_HART_ID - ecall - jr ra - .align 4 - - /* -2032: size_t sbi_num_harts(void); */ - li a7, MCALL_NUM_HARTS - ecall - jr ra - .align 4 - - /* -2016: unsigned long sbi_query_memory(unsigned long id, - memory_block_info *p); */ - li a7, MCALL_QUERY_MEMORY - ecall - jr ra - .align 4 - - /* -2000: int sbi_console_putchar(uint8_t ch); */ - li a7, MCALL_CONSOLE_PUTCHAR - ecall - jr ra - .align 4 - - /* -1984: int sbi_console_getchar(void); */ - li a0, -1 /* failure: coreboot doesn't support console input */ - jr ra - .align 4 - - /* -1968: Not allocated */ - ebreak - .align 4 - - /* -1952: int sbi_send_ipi(size_t hart_id); */ - ebreak - .align 4 - - /* -1936: int bool sbi_clear_ipi(void); */ - ebreak - .align 4 - - /* -1920: unsigned long sbi_timebase(void); */ - li a0, 1000000000 /* I have no idea. */ - jr ra - .align 4 - - /* -1904: void sbi_shutdown(void); */ - li a7, MCALL_SHUTDOWN - ecall - jr ra - .align 4 - - /* -1888: void sbi_set_timer(unsigned long long stime_value); */ - li a7, MCALL_SET_TIMER - ecall - jr ra - .align 4 - - /* -1872: int sbi_mask_interrupt(int which); */ - li a0, 0 # dummy - jr ra - .align 4 - - /* -1856: int sbi_unmask_interrupt(int which); */ - li a0, 0 # dummy - jr ra - .align 4 - - /* -1840: void sbi_remote_sfence_vm(const uintptr_t* harts, - size_t asid); */ - ebreak - .align 4 - - /* -1824: void sbi_remote_sfence_vm_range(const uintptr_t* harts, - size_t asid, uintptr_t start, uintptr_t size); */ - ebreak - .align 4 - - /* -1808: void sbi_remote_fence_i(const uintptr_t* harts); */ - ebreak - .align 4 - -/* Fill the remainder of the page */ -.align RISCV_PGSHIFT |