etc:users:jcmvbkbc:little-things:4
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
etc:users:jcmvbkbc:little-things:4 [2010/01/04 04:02] – plan jcmvbkbc | etc:users:jcmvbkbc:little-things:4 [2016/08/08 20:53] (current) – ↷ Page moved from users:jcmvbkbc:little-things:4 to etc:users:jcmvbkbc:little-things:4 kel | ||
---|---|---|---|
Line 7: | Line 7: | ||
===== Worklog ===== | ===== Worklog ===== | ||
+ | * Modify qemu (easy part): add timer to qemu device, use qemu_irq_pulse inside its callback; | ||
+ | * Make PCI device driver: start with init and exit fns, pci_driver structure and device table; | ||
+ | * Make PCI probe fn; main steps: | ||
+ | * pci_enable_device (enable device IO and memory); | ||
+ | * request_irq (still there' | ||
+ | * pci_set_drvdata (to make our device accessible from the struct device level); | ||
+ | * Make PCI release fn, do cleanup of what probe done; | ||
+ | * Add simple irq handler and sysfs output; | ||
+ | |||
+ | Code: ftp:// | ||
+ | |||
===== Conclusion ===== | ===== Conclusion ===== | ||
+ | * when to assert/ | ||
+ | * although it is generally level-triggered, | ||
+ | * anyway (e.g. for proper IRQ sharing) separate 'irq status' | ||
+ | * 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/ | ||
+ | * using tabs in Linux is stupid ): | ||
{{tag> | {{tag> |
etc/users/jcmvbkbc/little-things/4.1262566921.txt.gz · Last modified: 2010/01/04 04:02 by jcmvbkbc