mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 00:26:44 -04:00
Add IRQ handlers system
This commit is contained in:
parent
a774a2733b
commit
147dfc2374
@ -62,6 +62,14 @@ _irq%1:
|
||||
; Disable interruptions to avoid being interrupted
|
||||
cli
|
||||
|
||||
mov rax, [irq_handlers + 8 *%1]
|
||||
cmp rax, 0
|
||||
|
||||
je .eoi
|
||||
call rax
|
||||
|
||||
.eoi:
|
||||
|
||||
mov rax, %1 ; IRQ number
|
||||
cmp rax, 8
|
||||
jl .master
|
||||
@ -214,3 +222,7 @@ IDT64:
|
||||
IDTR64:
|
||||
dw (256 * 16) - 1 ; Limit
|
||||
dq IDT64 ; Base
|
||||
|
||||
; Handlers for each IRQ, 0 indicate no handler
|
||||
irq_handlers:
|
||||
times 16 dq 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user