X-Git-Url: http://git.dujemihanovic.xyz/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=blobdiff_plain;f=kernel%2Farch%2Fx86%2Firq%2Fstub.s;h=e5e43e522b2183c265cb9532dc19d9f5b74843e0;hb=63b19831bd7dd06e3c6fd8b9fe34e62f6697741e;hp=c15969a143d3b7909df8195583c055ac5bf77843;hpb=1bd5762d408e67c3bbe250db3decc809c98d7995;p=nameless-os.git diff --git a/kernel/arch/x86/irq/stub.s b/kernel/arch/x86/irq/stub.s index c15969a..e5e43e5 100644 --- a/kernel/arch/x86/irq/stub.s +++ b/kernel/arch/x86/irq/stub.s @@ -7,24 +7,77 @@ extern int_handler int_common: cld + push esp call int_handler - add esp, 4 + add esp, 12 popad iretd %macro INTERRUPT 1 -global int%1 +global int_%1 int_%1: + push dword 0 pushad push dword %1 jmp int_common %endmacro -%assign i 0 -%rep 48 -INTERRUPT i -%assign i i+1 -%endrep +%macro INTERRUPT_ERR 1 +global int_%1 +int_%1: + pushad + push dword %1 + jmp int_common +%endmacro + +INTERRUPT 0 +INTERRUPT 1 +INTERRUPT 2 +INTERRUPT 3 +INTERRUPT 4 +INTERRUPT 5 +INTERRUPT 6 +INTERRUPT 7 +INTERRUPT_ERR 8 +INTERRUPT 9 +INTERRUPT_ERR 10 +INTERRUPT_ERR 11 +INTERRUPT_ERR 12 +INTERRUPT_ERR 13 +INTERRUPT_ERR 14 +INTERRUPT 15 +INTERRUPT 16 +INTERRUPT_ERR 17 +INTERRUPT 18 +INTERRUPT 19 +INTERRUPT 20 +INTERRUPT_ERR 21 +INTERRUPT 22 +INTERRUPT 23 +INTERRUPT 24 +INTERRUPT 25 +INTERRUPT 26 +INTERRUPT 27 +INTERRUPT 28 +INTERRUPT_ERR 29 +INTERRUPT_ERR 30 +INTERRUPT 31 +INTERRUPT 32 +INTERRUPT 33 +INTERRUPT 34 +INTERRUPT 35 +INTERRUPT 36 +INTERRUPT 37 +INTERRUPT 38 +INTERRUPT 39 +INTERRUPT 40 +INTERRUPT 41 +INTERRUPT 42 +INTERRUPT 43 +INTERRUPT 44 +INTERRUPT 45 +INTERRUPT 46 +INTERRUPT 47 ; Define flat table containing addresses of handlers section .rodata