summaryrefslogtreecommitdiff
path: root/bsp
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2016-12-20 15:46:12 -0800
committerAndrew Waterman <andrew@sifive.com>2016-12-20 19:15:40 -0800
commitadecf626f023ee974e502703bdd024aceb9c7678 (patch)
tree30f62d118ee3744c12481c91f237737f968b524c /bsp
parent8c445a9e23ea4ccf34dfc52ee1030aa29681afbf (diff)
Avoid jal to weak symbols
The symbol may be overridden and end up out of range of JAL.
Diffstat (limited to 'bsp')
-rw-r--r--bsp/env/entry.S5
1 files changed, 3 insertions, 2 deletions
diff --git a/bsp/env/entry.S b/bsp/env/entry.S
index cbf26eb..b433628 100644
--- a/bsp/env/entry.S
+++ b/bsp/env/entry.S
@@ -46,7 +46,7 @@ trap_entry:
csrr a0, mcause
csrr a1, mepc
mv a2, sp
- jal handle_trap
+ call handle_trap
csrw mepc, a0
# Remain in M-mode after mret
@@ -90,6 +90,7 @@ trap_entry:
.weak handle_trap
handle_trap:
- j handle_trap
+1:
+ j 1b
#endif