forked from CHatingPython/towos
65 lines
965 B
ArmAsm
65 lines
965 B
ArmAsm
.altmacro
|
|
|
|
.section .text
|
|
.code64
|
|
|
|
.extern exception_handler
|
|
|
|
.macro isr_err_stub i=1
|
|
isr_stub_\i:
|
|
call exception_handler
|
|
iretq
|
|
.endm
|
|
|
|
.macro isr_nerr_stub i
|
|
isr_stub_\i:
|
|
call exception_handler
|
|
iretq
|
|
.endm
|
|
|
|
# From https://wiki.osdev.org/Interrupts_Tutorial
|
|
isr_nerr_stub 0
|
|
isr_nerr_stub 1
|
|
isr_nerr_stub 2
|
|
isr_nerr_stub 3
|
|
isr_nerr_stub 4
|
|
isr_nerr_stub 5
|
|
isr_nerr_stub 6
|
|
isr_nerr_stub 7
|
|
isr_err_stub 8
|
|
isr_nerr_stub 9
|
|
isr_err_stub 10
|
|
isr_err_stub 11
|
|
isr_err_stub 12
|
|
isr_err_stub 13
|
|
isr_err_stub 14
|
|
isr_nerr_stub 15
|
|
isr_nerr_stub 16
|
|
isr_err_stub 17
|
|
isr_nerr_stub 18
|
|
isr_nerr_stub 19
|
|
isr_nerr_stub 20
|
|
isr_nerr_stub 21
|
|
isr_nerr_stub 22
|
|
isr_nerr_stub 23
|
|
isr_nerr_stub 24
|
|
isr_nerr_stub 25
|
|
isr_nerr_stub 26
|
|
isr_nerr_stub 27
|
|
isr_nerr_stub 28
|
|
isr_nerr_stub 29
|
|
isr_err_stub 30
|
|
isr_nerr_stub 31
|
|
|
|
.macro isr_label i
|
|
.quad isr_stub_\i
|
|
.endm
|
|
|
|
.global isrStubTable
|
|
isrStubTable:
|
|
.set i, 0
|
|
.rept 32
|
|
isr_label %i
|
|
.set i, i+1
|
|
.endr
|