apsun / loliOS

Lightweight & operational Linux-inspired OS.
33 stars 1 forks source link

Split IRQ and IDT code #7

Closed apsun closed 8 years ago

apsun commented 8 years ago

The two are logically independent, IDT should be strictly for the interrupt handler ASM <-> C function linkage. This also causes bugs like passing INT_IRQ8 to the register_irq_handler when we should have used IRQ_RTC instead.

However, the IRQ code should probably not go into i8259.c, since that would introduce a circular dependency between i8259.c and idt.c.

apsun commented 8 years ago

Fixed in r9126. irq_* functions are now moved to a separate irq.c file.

Code should NEVER manually call anything in idt.c or i8259.c. All interrupt handling functionality should go through irq.c.