divide bumblebee and spike irq trap entry code

This commit is contained in:
acevest
2019-10-05 15:48:45 +08:00
parent 08170b3490
commit 2d419440f3
9 changed files with 392 additions and 121 deletions

View File

@@ -53,7 +53,8 @@ HAL_DRIVER_SRC = \
ASM_SOURCES =
ASM_SOURCES_S = \
$(TOP_DIR)/arch/risc-v/rv32i/gcc/port_s.S \
$(TOP_DIR)/arch/risc-v/rv32i/gcc/port_s.S \
$(TOP_DIR)/arch/risc-v/spike/gcc/riscv_port_s.S \
start.S

View File

@@ -1,15 +1,12 @@
// See LICENSE for license details.
#include "riscv_encoding.h"
.align 2
.section .text.entry
.globl _start
.type _start,@function
_start:
csrc mstatus, MSTATUS_MIE
csrc mstatus, 0x00000008
csrw mie, 0
la t0, trap_entry
la t0, rv32_trap_entry
csrw mtvec, t0
la sp, _stack_top

View File

@@ -1,15 +1,14 @@
// See LICENSE for license details.
#include "riscv_encoding.h"
.extern rv32_trap_entry
.align 2
.section .text.entry
.globl _start
.type _start,@function
_start:
csrc mstatus, MSTATUS_MIE
csrc mstatus, 0x00000008
csrw mie, 0
la t0, trap_entry
la t0, rv32_trap_entry
csrw mtvec, t0
la sp, _stack_top