AHCI weird IRQ count
Posted: Fri Mar 19, 2021 5:09 am
Hi, it's me with more AHCI questions.
I've recently noticed that on VMWare + real hardware (unlike QEMU) I get 2 IRQs for any command,
first with D2H interrupt status (which also clears the command issue bit), and second with no interrupt status bits set, which I find kind of weird.
I don't set the interrupt on completion bit in the PDT entries, and even if I did I would expect to see bit 5
in the port interrupt status set. (I should also say that I get 2 IRQS no matter how many PRDT entries I have)
I've tried looking at the spec but didn't find anything useful. Thanks.
UPD: Actually, it does happen on QEMU as well, but the HBA interrupt status is set to 0 by the time I get the second one, heres QEMU log:
I've recently noticed that on VMWare + real hardware (unlike QEMU) I get 2 IRQs for any command,
first with D2H interrupt status (which also clears the command issue bit), and second with no interrupt status bits set, which I find kind of weird.
I don't set the interrupt on completion bit in the PDT entries, and even if I did I would expect to see bit 5
in the port interrupt status set. (I should also say that I get 2 IRQS no matter how many PRDT entries I have)
I've tried looking at the spec but didn't find anything useful. Thanks.
UPD: Actually, it does happen on QEMU as well, but the HBA interrupt status is set to 0 by the time I get the second one, heres QEMU log:
[INFO] AHCI: executing op READ | lba range: 0 -> 8 length: 8 | 1 physical range(s) | slot 0 // my OS log
[email protected]:ahci_trigger_irq ahci(000000004da83d40)[0]: trigger irq +DHRS (0x00000001); irqstat: 0x00000000 --> 0x00000001; effective: 0x00000001
[email protected]:ahci_check_irq ahci(000000004da83d40): check irq 0x00000000 --> 0x00000001
[email protected]:ahci_irq_raise ahci(000000004da83d40): raise irq
[email protected]:ahci_check_irq ahci(000000004da83d40): check irq 0x00000000 --> 0x00000001
[email protected]:ahci_irq_raise ahci(000000004da83d40): raise irq
[email protected]:ahci_check_irq ahci(000000004da83d40): check irq 0x00000001 --> 0x00000000
[email protected]:ahci_irq_lower ahci(000000004da83d40): lower irq
[email protected]:ahci_check_irq ahci(000000004da83d40): check irq 0x00000000 --> 0x00000000
[email protected]:ahci_irq_lower ahci(000000004da83d40): lower irq