idt: Move dummy_isr() to its own assembly file

This commit is contained in:
mintsuki 2021-10-22 12:17:16 +02:00
parent f061965f69
commit 4925f7e3dd
4 changed files with 34 additions and 5 deletions

View File

@ -0,0 +1,8 @@
extern lapic_eoi
global dummy_isr
dummy_isr:
pusha
call lapic_eoi
popa
iretd

1
stage23/sys/dummy_isr.asm32 Symbolic link
View File

@ -0,0 +1 @@
dummy_isr.asm

View File

@ -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

View File

@ -9,11 +9,7 @@
static struct idt_entry *dummy_idt = NULL; static struct idt_entry *dummy_idt = NULL;
__attribute__((interrupt)) void dummy_isr(void);
static void dummy_isr(void *p) {
(void)p;
lapic_eoi();
}
void init_flush_irqs(void) { void init_flush_irqs(void) {
size_t dummy_idt_size = 256 * sizeof(struct idt_entry); size_t dummy_idt_size = 256 * sizeof(struct idt_entry);