|
|
|
@ -1,6 +1,9 @@
@@ -1,6 +1,9 @@
|
|
|
|
|
# |
|
|
|
|
# interrupts.s: basic irq handling setup |
|
|
|
|
# |
|
|
|
|
# 2021 flabbergast@drak.xyz
|
|
|
|
|
# Unlicense: https://unlicense.org/ |
|
|
|
|
# |
|
|
|
|
# ! when you edit the irq handler, don't forget to push/pop |
|
|
|
|
# any extra registers that you use ! |
|
|
|
|
# - we don't use the vectored interrupt handling, so |
|
|
|
@ -12,6 +15,13 @@
@@ -12,6 +15,13 @@
|
|
|
|
|
# (SiFive FE310 only has 3 interrupt sources (sw, timer, plic), |
|
|
|
|
# so any vector table would only have 3 "used" entries.) |
|
|
|
|
# |
|
|
|
|
.if compressed_isa
|
|
|
|
|
.balign 2, 0 |
|
|
|
|
.else |
|
|
|
|
.balign 4, 0 |
|
|
|
|
.endif |
|
|
|
|
|
|
|
|
|
.include "platform_regs.inc" |
|
|
|
|
|
|
|
|
|
irq_handler: |
|
|
|
|
addi sp, sp, 3*(-4) |
|
|
|
|