diff options
Diffstat (limited to 'machine/sbi_impl.c')
-rw-r--r-- | machine/sbi_impl.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/machine/sbi_impl.c b/machine/sbi_impl.c deleted file mode 100644 index f5ed8c9..0000000 --- a/machine/sbi_impl.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "mtrap.h" -#include "sbi.h" - -uintptr_t __sbi_query_memory(uintptr_t id, memory_block_info *p) -{ - if (id == 0) { - p->base = first_free_paddr; - p->size = mem_size + DRAM_BASE - p->base; - return 0; - } - - return -1; -} - -#define LOW_IRQ_OK(n) ((n) == IRQ_S_SOFT || (n) == IRQ_S_TIMER) - -uintptr_t __sbi_mask_interrupt(uintptr_t which) -{ - if (!LOW_IRQ_OK(which)) - return -1; - - clear_csr(sie, 1UL << which); - return 0; -} - -uintptr_t __sbi_unmask_interrupt(uintptr_t which) -{ - if (!LOW_IRQ_OK(which)) - return -1; - - set_csr(sie, 1UL << which); - return 0; -} |