Skip to main content

Module interrupt

Module interrupt 

Source

ModulesΒ§

idt πŸ”’
pic_8259
pit
plugbox
Registrar of IRQ handling routines

FunctionsΒ§

handle_exception πŸ”’
handles exception/faults (nr < 32);
handle_irq πŸ”’ ⚠
handle_irq assumes the interrupt is disabled when called. this will also make sure interrupt is disabled when it returns
handle_syscall πŸ”’
dispatch a syscall (int 0x80). The syscall number is in rax; args in rdi, rsi, rdx. The return value is written back into the trap frame’s rax so iretq returns it to user space.
init
initialize the idt and pic_8259
interrupt_disable
interrupt_enable
irq_restore
irq_restore only re-enable irq if was_enabled==true. it will not disable irq regardless the was_enabled value. This function should only be called to restore irq based on previous irq_save();
irq_save
irq_save() disables all interrupts and returns the previous state
trap_gate πŸ”’