summaryrefslogtreecommitdiff
path: root/software/first
diff options
context:
space:
mode:
authorSilvan Jegen <s.jegen@gmail.com>2019-08-24 16:47:37 +0200
committerSilvan Jegen <s.jegen@gmail.com>2019-08-24 16:47:37 +0200
commit6859d71bc3e4705bb54003488c42db3ad6211bfb (patch)
tree4d785a4256e8927114520995574baa3f1e520e52 /software/first
parent71809c8c794e22d80559671c06fa2e6db8e2df60 (diff)
setup_timer_irq: don't shift ISR address to the left
Diffstat (limited to 'software/first')
-rw-r--r--software/first/setup_timer_irq.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/software/first/setup_timer_irq.S b/software/first/setup_timer_irq.S
index 84ecde8..6d23c6d 100644
--- a/software/first/setup_timer_irq.S
+++ b/software/first/setup_timer_irq.S
@@ -9,8 +9,7 @@ setup_timer_irq:
addi sp, sp, -16 # Allocate stack frame
sw ra, 12(sp) # save return address to the stack
- la t0, irq_handler # load address of irq_handler
- slli t0, t0, 1 # shift address left by one; LSB will be 0 which is direct mode (what we want)
+ la t0, irq_handler # load address of irq_handler
csrw mtvec, t0 # write handler address and mode
# Here we cannot use csrsi because it can only set up to 5 bits