Spurious IRQs

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
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Spurious IRQs

Post by BrightLight »

I know why spurious IRQs occur, but my question is this: why do they occur so often, and only in Bochs?
For example, from my kernel log messages:

Code: Select all

[apic] received a spurious IRQ, total of 1 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 2 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 3 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 4 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 5 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 6 spurious IRQs occured since boot.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Spurious IRQs

Post by Brendan »

Hi,
omarrx024 wrote:I know why spurious IRQs occur, but my question is this: why do they occur so often, and only in Bochs?
For example, from my kernel log messages:

Code: Select all

[apic] received a spurious IRQ, total of 1 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 2 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 3 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 4 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 5 spurious IRQs occured since boot.
[apic] received a spurious IRQ, total of 6 spurious IRQs occured since boot.
Are you using polling for something?

E.g. device sends IRQ to IO APIC, IO APIC starts sending IRQ to CPU, you poll the device and the interrupt disappears, now APIC has told CPU there's an IRQ and CPU wants to know which one and APIC can only say "Heh, um, it was spurious" to keep CPU happy.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
BrightLight
Member
Member
Posts: 901
Joined: Sat Dec 27, 2014 9:11 am
Location: Maadi, Cairo, Egypt
Contact:

Re: Spurious IRQs

Post by BrightLight »

My ATA driver uses polling, but this occurs after the boot has finished. The system isn't doing anything while the spurious IRQs occur.
Pressing Ctrl+Left Mouse Button+Right Mouse Button seems to create the IRQ.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Post Reply