clear APIC IRR
clear APIC IRR
I'm trying to poll interrupts. I can detect that an interrupt has come in on the IRR by reading it. I could service the interrupt right there without enabling interrupts in CFLAGS. However, I couldn't find a way to clear bits from the IRR. Is there any way to do this or am I going about this the wrong way?
-
- Member
- Posts: 283
- Joined: Mon Jan 03, 2011 6:58 pm
Re: clear APIC IRR
Why are you polling? o.O
Re: clear APIC IRR
Use EOI (End-Of-Interrupt) registers to acknowledge serviced interrupt, Luke.
Re: clear APIC IRR
EOI only acks the ISR, not the IRR according to the intel manual. Can you point me to documentation that says otherwise?
Polling is nice because I only take interrupts at explicit points in time, so I would rather just call the corresponding handler than take an interrupt which causes a pipeline flush and other slowdown.
Polling is nice because I only take interrupts at explicit points in time, so I would rather just call the corresponding handler than take an interrupt which causes a pipeline flush and other slowdown.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: clear APIC IRR
Then don't check the PIC, but rather the device itself you're interested in.
Re: clear APIC IRR
The issue is that it could be a number of devices. I think explicitly checking every potential interrupt generating device in the system doesn't scale.
Re: clear APIC IRR
Do you think it's possible that interrupts are provided for that reason ?dschatz wrote:The issue is that it could be a number of devices. I think explicitly checking every potential interrupt generating device in the system doesn't scale.
If a trainstation is where trains stop, what is a workstation ?
Re: clear APIC IRR
First of all there are plenty of reasons why interrupts are provided that have nothing to do with the scalability of polling. Second of all, I'm asking how to clear the IRR on the APIC, not how to check every interrupt generating device in the system. I just want to know how I can poll for interrupts without talking to every device in the system. If its not possible or no one knows, thats fine.gerryg400 wrote:Do you think it's possible that interrupts are provided for that reason ?dschatz wrote:The issue is that it could be a number of devices. I think explicitly checking every potential interrupt generating device in the system doesn't scale.
Re: clear APIC IRR
Wait a minute. It was you that complained about having to explicitly check every interrupt generating device. And it was you that complained about it not scaling.dschatz wrote:First of all there are plenty of reasons why interrupts are provided that have nothing to do with the scalability of polling. Second of all, I'm asking how to clear the IRR on the APIC, not how to check every interrupt generating device in the system. I just want to know how I can poll for interrupts without talking to every device in the system. If its not possible or no one knows, thats fine.gerryg400 wrote:Do you think it's possible that interrupts are provided for that reason ?dschatz wrote:The issue is that it could be a number of devices. I think explicitly checking every potential interrupt generating device in the system doesn't scale.
Anyway to answer your original question, you cannot write to the IRR. An EOI will clear the highest set ISR bit potentially making way for bit in the IRR to be transferred to the ISR. Bits in the IRR are not explicitly cleared, they are moved to the ISR. Let's say that IRR bit 100 is set. That bit will not be cleared (moved to ISR 100) until every bit of higher priority in the ISR is cleared by EOI.
I've not tried this with polling but I can't immediately see why it won't work.
If a trainstation is where trains stop, what is a workstation ?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: clear APIC IRR
ISR means in-service-register. To get a bit into the ISR, you need to accept an interrupt.