Skip to content

IRQ handler indirection #6

@alfreb

Description

@alfreb

It's necessary to redo the IRQ system: We can arbitrarily assign new IRQ-handlers via IRQ_manager::set_handler(irq, fptr) but this adds the handler directly to IDT. This means the handler has to be an asm-function (due to iret). That asm-function in turn has to call a handler.

So, we need to have:

asm_irq_n_handler -> irq_n_handler -> add_irq_to_task_queue 

Actually, we don't want any work to be done directly by the IRQ-handler, other than just push it to a qeueue, so IRQ_manager::set_handler should not register directly to IDT, but instead to a "subscribe queue". (So, let's leave the set_handler - or remove it - and make a IRQ_manager::subscribe(irq,callback). Every IRQ that has subscribers will then have to have proper "numbered" handlers, which sets a flag or a function pointer. This way, any subscribers will be notified after the IRQ has triggered, and the CPU has returned to the halt-loop.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions