Shared IRQ lines

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Shared IRQ lines

Post by gaf »

Hello,
is there any way of telling which device caused an shared IRQ or does this have to be determined by the drivers themselves ?

regards,
gaf
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Shared IRQ lines

Post by distantvoices »

I think this has to be determined by the drivers. There are some flags/functions in the pci config space which can be used to determine inside the interrupt handler: Have you triggered this irq? if no? next interrupt handler please. Untl, if no handler feels responsible, a global handler is called to report about the facht that some hardware has demanded attention.

In short, you build a linked list of handlers and have one after the other check the device - if it is responsible for the device, it should take the needed operations.

hm. Me is still at research concerning chained interrupt handlers and shared irq lines. so thats ust my rambling.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
User avatar
gaf
Member
Member
Posts: 349
Joined: Thu Oct 21, 2004 11:00 pm
Location: Munich, Germany

Re:Shared IRQ lines

Post by gaf »

Thanks for your help, beyond infinity. I think that it's a pretty bad hardware design if there's no standard way of detecting which device caused an IRQ, but that's just one of the idiocies of the x86 and I can't change it...
In short, you build a linked list of handlers and have one after the other check the device - if it is responsible for the device, it should take the needed operations.
I'd use a tree :). That way it's easier to keep track of the access rights: only an app/driver that already owns an IRQ can give it to (or share it with) another task.

regards,
gaf
Post Reply