Open Source & Linux Lab

It's better when it's simple

User Tools

Site Tools


etc:users:jcmvbkbc:little-things:4

This is an old revision of the document!


2010-01-04 Qemu PCI card with IRQ

Plan

  • Find the right way of triggering IRQ through PCI:
    • when to assert, when to deassert IRQ line;
    • when to start, when to cease interrupting;
  • Make PCI device driver that would handle IRQs;

Worklog

Conclusion

  • when to assert/deassert IRQ line: no matter (at least for emulation);
    • although it is generally level-triggered, qemu treats them as edge-triggered, so that qemu_irq_pulse may be used;
    • anyway (e.g. for proper IRQ sharing) separate 'irq status' register is needed for the device function (not implemented in this demo, but hold on :);
  • when to start/stop interrupts: doc contradiction;
    • PCI spec says that IRQ is enabled (interrupt disable == 0 in command register) upon reset, but linux pci documentation says that IRQ will go only when you explicitly enable them;
    • anyway, nothing happens (at least, nothing is visible) until request_irq;
    • even more: right place to request_irq is not probe routine, but rather device open routine;
  • qemu 0.12.1 yields maximum of ~3000 PCI interrupts/second;
  • using tabs in Linux is stupid ):
etc/users/jcmvbkbc/little-things/4.1262833859.txt.gz · Last modified: 2010/01/07 06:10 by jcmvbkbc