diff --git a/stage23/sys/dummy_isr.asm b/stage23/sys/dummy_isr.asm new file mode 100644 index 00000000..48cc17d3 --- /dev/null +++ b/stage23/sys/dummy_isr.asm @@ -0,0 +1,8 @@ +extern lapic_eoi + +global dummy_isr +dummy_isr: + pusha + call lapic_eoi + popa + iretd diff --git a/stage23/sys/dummy_isr.asm32 b/stage23/sys/dummy_isr.asm32 new file mode 120000 index 00000000..4d563df2 --- /dev/null +++ b/stage23/sys/dummy_isr.asm32 @@ -0,0 +1 @@ +dummy_isr.asm \ No newline at end of file diff --git a/stage23/sys/dummy_isr.asm64 b/stage23/sys/dummy_isr.asm64 new file mode 100644 index 00000000..fd3f0518 --- /dev/null +++ b/stage23/sys/dummy_isr.asm64 @@ -0,0 +1,24 @@ +extern lapic_eoi + +global dummy_isr +dummy_isr: + push rax + push rcx + push rdx + push rsi + push rdi + push r8 + push r9 + push r10 + push r11 + call lapic_eoi + pop r11 + pop r10 + pop r9 + pop r8 + pop rdi + pop rsi + pop rdx + pop rcx + pop rax + iretq diff --git a/stage23/sys/idt.c b/stage23/sys/idt.c index 9b12b58d..b68657ff 100644 --- a/stage23/sys/idt.c +++ b/stage23/sys/idt.c @@ -9,11 +9,7 @@ static struct idt_entry *dummy_idt = NULL; -__attribute__((interrupt)) -static void dummy_isr(void *p) { - (void)p; - lapic_eoi(); -} +void dummy_isr(void); void init_flush_irqs(void) { size_t dummy_idt_size = 256 * sizeof(struct idt_entry);