How does OS assign IRQ?

H

Hawk Gauss

Dear All,

I encounter a problem about IRQ conflict problem.

BIOS print IRQ15 is assigned to serial bus controller.
But OS re-assign IRQ9 to it, and conflict occur when I insert my PC card
which use ISA IRQ9.
I found USB controller try to change its IRQ9 to IRQ11, which is used by a
bad device driver. Then the system screen turn blue.:-(

I can adjust IRQ resource in my BIOS, but there are too many hardware to
modify.
So I decide to find resolution in XPe configuration quickly.

How does OS manage IRQs for its driver?
Is there any orders for OS to assign IRQ to its PCI devices?

I am so confused about such problem because it is urgent in my schedule.

Any help will be appreciated.
Thanks
 
S

Slobodan Brcin \(eMVP\)

Hi Hawk,

This is tough question.

For instance all PCI slots and usually AGP share only 4 wires for IRQ on most motherboards.
ISA as legacy might go trough ISA2PCI bridge and share those 4 wires as well.

As you can see if you have more than 4 devices some physical int level sharing must be done.

Per PCI standard each PCI card can have up to 4 level triggered interrupts. Interrupts are named as INTA# INTB# INTC# INTD#.
Most simpler PCI cards are hardwired to use INTA# line and that mean that you can not reassign its interrupt trough software.

On motherboards there are usually four lines that connect these lines in some cyclic order. Lines are named IRQW IRQX IRQY IRQZ

Following will illustrate how each PCI card in some slot is mapped to MB:
IRQW IRQX IRQY IRQZ
0 INTA# INTB# INTC# INTD#.
1 INTB# INTC# INTD# INTA#.
2 INTC# INTD# INTA# INTB#.
3 INTD# INTA# INTB# INTC#.
4 INTA# INTB# INTC# INTD#.
....

These lines are connected to APIC that can translate these signals to some IRQ numbers that windows tell it to. But only as long as
you do not have hardware IRQ conflict since then IRQ are shared physically not trough software.
Some "smarter" PCI cards that use all four IRQ lines allow you to chose one that will be used INTA#..INTD#. So you can avoid
collision trough software instead of repluging cards.

Also all level triggered interrupts are intended to work together on same IRQ line trough sharing. Each driver then examine hardware
that it cover and try to figure out if it should handle that IRQ.

There is much more to this, and you should look for it on the net.

Depending on your hardware capabilities you should examine:
http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=IRQConfig

Or rearrange PCI card positions.

Regards,
Slobodan
 
H

Hawk Gauss

Hi, Slobodan

Thank you very much. You have given a valuable lesson about PCI IRQ to me.
I think that I know little about IRQ before.

If I can reserve one IRQ from pci card, maybe my problem will disappear.
During my work, I find some registy keys whose name tell me they may be
related to reserve some IRQ or Assignment order.

[ HKLM\System\CurrentControlSet\Control\Arbiters\AllocationOrder ]
[ HKLM\System\CurrentControlSet\Control\Arbiters\ReservedResources ]

[ HKLM\System\CurrentControlSet\Control\SystemResources\AssignmentOrdering ]
[ HKLM\System\CurrentControlSet\Control\SystemResources\ReservedResources ]

Unfortunately, no change occur even if I change them in my XPe
configuration.
and all registry keys return original value.

Furthermore, I find the following registy:
[ HKLM\System\CurrentControlSet\Control\PnP\PciIrqRouting ]
I wonder how they work in Windows OS,and
why my change on above registry value is recovered.

Best Regards
Hawk
 
K

KM

Hawk,
If I can reserve one IRQ from pci card, maybe my problem will disappear.
During my work, I find some registy keys whose name tell me they may be
related to reserve some IRQ or Assignment order.

[ HKLM\System\CurrentControlSet\Control\Arbiters\AllocationOrder ]
[ HKLM\System\CurrentControlSet\Control\Arbiters\ReservedResources ]

[ HKLM\System\CurrentControlSet\Control\SystemResources\AssignmentOrdering ]
[ HKLM\System\CurrentControlSet\Control\SystemResources\ReservedResources ]

Unfortunately, no change occur even if I change them in my XPe
configuration.
and all registry keys return original value.

These registry entries are set by "PnP (Kernel-mode)" component. So if you want to change the entries through your component, make
sure that the component's build order is set above the "PnP (Kernel-mode)" build order.
Or just change the registry values directly at the "PnP (Kernel-mode)" component registry section in TD.

I don't have a clue if it will help you to change the Irq assigment order (it may be easier to test the reg.changes on XP Pro).

--
Regards,
KM

Furthermore, I find the following registy:
[ HKLM\System\CurrentControlSet\Control\PnP\PciIrqRouting ]
I wonder how they work in Windows OS,and
why my change on above registry value is recovered.
Best Regards
Hawk


Slobodan Brcin (eMVP) said:
Hi Hawk,

This is tough question.

For instance all PCI slots and usually AGP share only 4 wires for IRQ on
most motherboards.
ISA as legacy might go trough ISA2PCI bridge and share those 4 wires as
well.

As you can see if you have more than 4 devices some physical int level
sharing must be done.

Per PCI standard each PCI card can have up to 4 level triggered
interrupts. Interrupts are named as INTA# INTB# INTC# INTD#.
Most simpler PCI cards are hardwired to use INTA# line and that mean that
you can not reassign its interrupt trough software.

On motherboards there are usually four lines that connect these lines in
some cyclic order. Lines are named IRQW IRQX IRQY IRQZ

Following will illustrate how each PCI card in some slot is mapped to MB:
IRQW IRQX IRQY IRQZ
0 INTA# INTB# INTC# INTD#.
1 INTB# INTC# INTD# INTA#.
2 INTC# INTD# INTA# INTB#.
3 INTD# INTA# INTB# INTC#.
4 INTA# INTB# INTC# INTD#.
...

These lines are connected to APIC that can translate these signals to some
IRQ numbers that windows tell it to. But only as long as
you do not have hardware IRQ conflict since then IRQ are shared physically
not trough software.
Some "smarter" PCI cards that use all four IRQ lines allow you to chose
one that will be used INTA#..INTD#. So you can avoid
collision trough software instead of repluging cards.

Also all level triggered interrupts are intended to work together on same
IRQ line trough sharing. Each driver then examine hardware
that it cover and try to figure out if it should handle that IRQ.

There is much more to this, and you should look for it on the net.

Depending on your hardware capabilities you should examine:
http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=IRQConfig

Or rearrange PCI card positions.

Regards,
Slobodan
 
S

Slobodan Brcin \(eMVP\)

Hi Hawk,

Like I said this is complicated topic and you should go with Konstantins suggestion. Try reassigning IRQ from Device Manager on
XPe/XPP on your hardware, if you are successful then we can talk or you can use regmon to find out what to change.
Also you have some limited ability to give hints to OS about what IRQ drivers prefer trough inf file but this does not guarantee
nothing since both hardware and driver must be capable of handling such information's.

Here you will find some good information's:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q314068
http://www.microsoft.com/whdc/system/sysperf/apic.mspx
http://search.microsoft.com/search/results.aspx?na=84&st=a&View=en-us&qu=APIC&qp=&qa=&qn=&c=&s=7
I found USB controller try to change its IRQ9 to IRQ11, which is used by a
bad device driver. Then the system screen turn blue.:-(

Perhaps you should determine what driver cause you problem and try updating it. Also you can tell us what driver is so bad so it
does not use sharing and we might find some alternative workaround.

Regards,
Slobodan


KM said:
Hawk,
If I can reserve one IRQ from pci card, maybe my problem will disappear.
During my work, I find some registy keys whose name tell me they may be
related to reserve some IRQ or Assignment order.

[ HKLM\System\CurrentControlSet\Control\Arbiters\AllocationOrder ]
[ HKLM\System\CurrentControlSet\Control\Arbiters\ReservedResources ]

[ HKLM\System\CurrentControlSet\Control\SystemResources\AssignmentOrdering ]
[ HKLM\System\CurrentControlSet\Control\SystemResources\ReservedResources ]

Unfortunately, no change occur even if I change them in my XPe
configuration.
and all registry keys return original value.

These registry entries are set by "PnP (Kernel-mode)" component. So if you want to change the entries through your component, make
sure that the component's build order is set above the "PnP (Kernel-mode)" build order.
Or just change the registry values directly at the "PnP (Kernel-mode)" component registry section in TD.

I don't have a clue if it will help you to change the Irq assigment order (it may be easier to test the reg.changes on XP Pro).

--
Regards,
KM

Furthermore, I find the following registy:
[ HKLM\System\CurrentControlSet\Control\PnP\PciIrqRouting ]
I wonder how they work in Windows OS,and
why my change on above registry value is recovered.
Best Regards
Hawk


Slobodan Brcin (eMVP) said:
Hi Hawk,

This is tough question.

For instance all PCI slots and usually AGP share only 4 wires for IRQ on
most motherboards.
ISA as legacy might go trough ISA2PCI bridge and share those 4 wires as
well.

As you can see if you have more than 4 devices some physical int level
sharing must be done.

Per PCI standard each PCI card can have up to 4 level triggered
interrupts. Interrupts are named as INTA# INTB# INTC# INTD#.
Most simpler PCI cards are hardwired to use INTA# line and that mean that
you can not reassign its interrupt trough software.

On motherboards there are usually four lines that connect these lines in
some cyclic order. Lines are named IRQW IRQX IRQY IRQZ

Following will illustrate how each PCI card in some slot is mapped to MB:
IRQW IRQX IRQY IRQZ
0 INTA# INTB# INTC# INTD#.
1 INTB# INTC# INTD# INTA#.
2 INTC# INTD# INTA# INTB#.
3 INTD# INTA# INTB# INTC#.
4 INTA# INTB# INTC# INTD#.
...

These lines are connected to APIC that can translate these signals to some
IRQ numbers that windows tell it to. But only as long as
you do not have hardware IRQ conflict since then IRQ are shared physically
not trough software.
Some "smarter" PCI cards that use all four IRQ lines allow you to chose
one that will be used INTA#..INTD#. So you can avoid
collision trough software instead of repluging cards.

Also all level triggered interrupts are intended to work together on same
IRQ line trough sharing. Each driver then examine hardware
that it cover and try to figure out if it should handle that IRQ.

There is much more to this, and you should look for it on the net.

Depending on your hardware capabilities you should examine:
http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=IRQConfig

Or rearrange PCI card positions.

Regards,
Slobodan



Dear All,

I encounter a problem about IRQ conflict problem.

BIOS print IRQ15 is assigned to serial bus controller.
But OS re-assign IRQ9 to it, and conflict occur when I insert my PC card
which use ISA IRQ9.
I found USB controller try to change its IRQ9 to IRQ11, which is used by
a
bad device driver. Then the system screen turn blue.:-(

I can adjust IRQ resource in my BIOS, but there are too many hardware to
modify.
So I decide to find resolution in XPe configuration quickly.

How does OS manage IRQs for its driver?
Is there any orders for OS to assign IRQ to its PCI devices?

I am so confused about such problem because it is urgent in my schedule.

Any help will be appreciated.
Thanks
 
K

KM

Hawk,

You may also want to try this tip:
Prioritizing IRQs: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl. Create a new DWORD value called IRQ8PRiority
and set the data to 1, reboot.

KM
If I can reserve one IRQ from pci card, maybe my problem will disappear.
During my work, I find some registy keys whose name tell me they may be
related to reserve some IRQ or Assignment order.

[ HKLM\System\CurrentControlSet\Control\Arbiters\AllocationOrder ]
[ HKLM\System\CurrentControlSet\Control\Arbiters\ReservedResources ]

[ HKLM\System\CurrentControlSet\Control\SystemResources\AssignmentOrdering ]
[ HKLM\System\CurrentControlSet\Control\SystemResources\ReservedResources ]

Unfortunately, no change occur even if I change them in my XPe
configuration.
and all registry keys return original value.

These registry entries are set by "PnP (Kernel-mode)" component. So if you want to change the entries through your component, make
sure that the component's build order is set above the "PnP (Kernel-mode)" build order.
Or just change the registry values directly at the "PnP (Kernel-mode)" component registry section in TD.

I don't have a clue if it will help you to change the Irq assigment order (it may be easier to test the reg.changes on XP Pro).

--
Regards,
KM

Furthermore, I find the following registy:
[ HKLM\System\CurrentControlSet\Control\PnP\PciIrqRouting ]
I wonder how they work in Windows OS,and
why my change on above registry value is recovered.
Best Regards
Hawk


Slobodan Brcin (eMVP) said:
Hi Hawk,

This is tough question.

For instance all PCI slots and usually AGP share only 4 wires for IRQ on
most motherboards.
ISA as legacy might go trough ISA2PCI bridge and share those 4 wires as
well.

As you can see if you have more than 4 devices some physical int level
sharing must be done.

Per PCI standard each PCI card can have up to 4 level triggered
interrupts. Interrupts are named as INTA# INTB# INTC# INTD#.
Most simpler PCI cards are hardwired to use INTA# line and that mean that
you can not reassign its interrupt trough software.

On motherboards there are usually four lines that connect these lines in
some cyclic order. Lines are named IRQW IRQX IRQY IRQZ

Following will illustrate how each PCI card in some slot is mapped to MB:
IRQW IRQX IRQY IRQZ
0 INTA# INTB# INTC# INTD#.
1 INTB# INTC# INTD# INTA#.
2 INTC# INTD# INTA# INTB#.
3 INTD# INTA# INTB# INTC#.
4 INTA# INTB# INTC# INTD#.
...

These lines are connected to APIC that can translate these signals to some
IRQ numbers that windows tell it to. But only as long as
you do not have hardware IRQ conflict since then IRQ are shared physically
not trough software.
Some "smarter" PCI cards that use all four IRQ lines allow you to chose
one that will be used INTA#..INTD#. So you can avoid
collision trough software instead of repluging cards.

Also all level triggered interrupts are intended to work together on same
IRQ line trough sharing. Each driver then examine hardware
that it cover and try to figure out if it should handle that IRQ.

There is much more to this, and you should look for it on the net.

Depending on your hardware capabilities you should examine:
http://search.microsoft.com/search/results.aspx?st=b&na=88&View=en-us&qu=IRQConfig

Or rearrange PCI card positions.

Regards,
Slobodan



Dear All,

I encounter a problem about IRQ conflict problem.

BIOS print IRQ15 is assigned to serial bus controller.
But OS re-assign IRQ9 to it, and conflict occur when I insert my PC card
which use ISA IRQ9.
I found USB controller try to change its IRQ9 to IRQ11, which is used by
a
bad device driver. Then the system screen turn blue.:-(

I can adjust IRQ resource in my BIOS, but there are too many hardware to
modify.
So I decide to find resolution in XPe configuration quickly.

How does OS manage IRQs for its driver?
Is there any orders for OS to assign IRQ to its PCI devices?

I am so confused about such problem because it is urgent in my schedule.

Any help will be appreciated.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SMBus ACPI IRQ Allocation 1
Reserve legacy IRQ 3
Reserve IRQ for legacy devices 6
IRQ conflict 26
Windows XP Irq Hard Times 2
How XP assigns IRQ? 1
How XP assigns IRQ? 1
Assigning IRQ to PCI slot in Asus A7N8X? 3

Top