summaryrefslogtreecommitdiffstats
path: root/bsps/riscv/riscv/start/start.S
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/riscv/riscv/start/start.S')
-rw-r--r--bsps/riscv/riscv/start/start.S10
1 files changed, 10 insertions, 0 deletions
diff --git a/bsps/riscv/riscv/start/start.S b/bsps/riscv/riscv/start/start.S
index 58bc57dc12..1d0bde164b 100644
--- a/bsps/riscv/riscv/start/start.S
+++ b/bsps/riscv/riscv/start/start.S
@@ -52,6 +52,11 @@ SYM(_start):
la gp, __global_pointer$
.option pop
+#ifdef RTEMS_SMP
+ csrr s0, mhartid
+ bnez s0, .Lloop_forever
+#endif
+
la t0, ISR_Handler
csrw mtvec, t0
@@ -70,6 +75,11 @@ SYM(_start):
j boot_card
+#ifdef RTEMS_SMP
+.Lloop_forever:
+ j .Lloop_forever
+#endif
+
.align 4
bsp_start_vector_table_begin:
.word _RISCV_Exception_default /* User int */