IRQ1 not delivered while CPU hlt'ed
Posted: Fri Jun 09, 2006 6:41 am
Hooray for Mega-Tokyo again. I posted a message in other forums (after a lot of trying) and now I can't reply or login again anymore... so here is my question:
Hi there,
I've been really struggling with a problem the last week or two and I've gone looking everywhere for it. I've modified the way I handle IRQs, done checks at every point, etc.
Basically, I have an idle thread which does a 'hlt'. So the CPU is waiting for an interrupt to wake it up. IRQ1 is triggered when I press a key but the IRQ1 does not wake up the CPU. IRQ12 does fire when I move the mouse and it correctly wakes up the CPU. If I press several keys and then move the mouse to wake the CPU, IRQ1 fires successfully for the all the previous keystrokes I did as it should have done previously.
Then if I remove the 'hlt' from the idle thread and replace it with an infinite loop (while 1==1 continue), then IRQ1 is delivered as it is supposed to be delivered - immediately.
IRQ1 is not masked. Interrupts are enabled. It only happens on *some* computers and vmware. I've followed all examples of PIC/APIC/IOAPIC/NMI/etc initialization and the problem remains.
My current guess now is that the motherboard/chipset is initialized by the BIOS during boot to prevent IRQ1s being delivered to the CPU while it is hlt'ed. (Wake on keyboard? ACPI strangeness?).
Has anyone seen anything like this before?
Hi there,
I've been really struggling with a problem the last week or two and I've gone looking everywhere for it. I've modified the way I handle IRQs, done checks at every point, etc.
Basically, I have an idle thread which does a 'hlt'. So the CPU is waiting for an interrupt to wake it up. IRQ1 is triggered when I press a key but the IRQ1 does not wake up the CPU. IRQ12 does fire when I move the mouse and it correctly wakes up the CPU. If I press several keys and then move the mouse to wake the CPU, IRQ1 fires successfully for the all the previous keystrokes I did as it should have done previously.
Then if I remove the 'hlt' from the idle thread and replace it with an infinite loop (while 1==1 continue), then IRQ1 is delivered as it is supposed to be delivered - immediately.
IRQ1 is not masked. Interrupts are enabled. It only happens on *some* computers and vmware. I've followed all examples of PIC/APIC/IOAPIC/NMI/etc initialization and the problem remains.
My current guess now is that the motherboard/chipset is initialized by the BIOS during boot to prevent IRQ1s being delivered to the CPU while it is hlt'ed. (Wake on keyboard? ACPI strangeness?).
Has anyone seen anything like this before?