aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/interrupts/irq.asm
diff options
context:
space:
mode:
authorMarvin Borner2020-05-09 23:50:24 +0200
committerMarvin Borner2020-05-09 23:50:24 +0200
commitc5b0305b3a6e7e6ec6742b99ceb6a1a0b3c6e286 (patch)
tree173965f614435bb9740d05bbc365aba7b76d7e45 /src/kernel/interrupts/irq.asm
parente350804dc78ab01aaca6aba33792a652535028d9 (diff)
Interrupt analysis - removed many useless cli/sti
Diffstat (limited to 'src/kernel/interrupts/irq.asm')
-rw-r--r--src/kernel/interrupts/irq.asm51
1 files changed, 26 insertions, 25 deletions
diff --git a/src/kernel/interrupts/irq.asm b/src/kernel/interrupts/irq.asm
index f616944..da7323e 100644
--- a/src/kernel/interrupts/irq.asm
+++ b/src/kernel/interrupts/irq.asm
@@ -1,10 +1,10 @@
%macro IRQ 2
global irq%1
irq%1:
- cli
- push byte 0
- push byte %2
- jmp irq_common_stub
+ cli
+ push byte 0
+ push byte %2
+ jmp irq_common_stub
%endmacro
IRQ 0, 32
@@ -26,29 +26,30 @@ IRQ 15, 47
extern irq_handler
irq_common_stub:
- pusha
+ pusha
- push ds
- push es
- push fs
- push gs
+ push ds
+ push es
+ push fs
+ push gs
- mov ax, 0x10
- mov ds, ax
- mov es, ax
- mov fs, ax
- mov gs, ax
- cld
+ mov ax, 0x10
+ mov ds, ax
+ mov es, ax
+ mov fs, ax
+ mov gs, ax
+ cld
- push esp
- call irq_handler
- add esp, 4
+ push esp
+ call irq_handler
+ add esp, 4
- pop gs
- pop fs
- pop es
- pop ds
- popa
+ pop gs
+ pop fs
+ pop es
+ pop ds
+ popa
- add esp, 8
- iret \ No newline at end of file
+ add esp, 8
+ sti
+ iret \ No newline at end of file