Fix interruptions

This commit is contained in:
Baptiste Wicht 2013-11-04 19:14:42 +01:00
parent 551dd10dc2
commit ed91c5ce5a

View File

@ -111,20 +111,40 @@ _isr%1:
%macro CREATE_IRQ 1
_irq%1:
push rax
; Disable interruptions to avoid being interrupted
cli
push rax
mov rax, [irq_handlers + 8 *%1]
; If there are no handler, just send EOI
test rax, rax
je .eoi
push rax
push rcx
push rdx
push rsi
push rdi
push r8
push r9
push r10
push r11
; Call the handler
call rax
pop r11
pop r10
pop r9
pop r8
pop rdi
pop rsi
pop rdx
pop rcx
pop rax
.eoi:
mov rax, %1 ; IRQ number