I had not understood how MSIs work and I was unnecessarily routing them through IOAPIC. This is not necessary and should not be done :D Also MSIs were reserving interrupts that IOAPIC was capable of generating. Now IOAPIC and MSIs use different set of interrupts so IOAPIC can use more interrupts if needed.
18 lines
340 B
C++
18 lines
340 B
C++
#include <kernel/IDT.h>
|
|
#include <kernel/Interruptable.h>
|
|
#include <kernel/InterruptController.h>
|
|
#include <kernel/Processor.h>
|
|
|
|
namespace Kernel
|
|
{
|
|
|
|
void Interruptable::set_irq(int irq)
|
|
{
|
|
if (m_irq != -1)
|
|
Processor::idt().register_irq_handler(m_irq, nullptr);
|
|
m_irq = irq;
|
|
Processor::idt().register_irq_handler(irq, this);
|
|
}
|
|
|
|
}
|