I believe I have stumbled upon a bug while developing an ATA PIO driver for my toy operating system. My driver was polling the status register of the primary ATA device, and thus, clearing the interrupt, as I wasn't reading from the secondary.
My IRQs, as usual, are remapped from 0x20 for the Master PIC and from 0x28 for the Slave.
The following log shows a trace of the emulation of the operating system I'm developing. There are some additions and modifications to the log messages.
Has can be deduced from the log, if the IRQ#14 [1] goes low [2] before IRQ#2 is raised [3], Bochs will morph the lowered IRQ#14 interrupt into [4] an spurious IRQ#15 [5].
The aforementioned behavior is produced by line, which will morph any slave interrupt lowered, into an IRQ#15.
I don't know if the behavior I'm describing is intended, but it feels smelly to me, although this has to be well-exercised code path. I'd also like to add that it has been driving me crazy because QEMU treated the interrupt as an IRQ#14.
The logging modifications I've made are available here
Hello Bochs team,
I believe I have stumbled upon a bug while developing an ATA PIO driver for my toy operating system. My driver was polling the status register of the primary ATA device, and thus, clearing the interrupt, as I wasn't reading from the secondary.
My IRQs, as usual, are remapped from 0x20 for the Master PIC and from 0x28 for the Slave.
The following log shows a trace of the emulation of the operating system I'm developing. There are some additions and modifications to the log messages.
Has can be deduced from the log, if the IRQ#14 [1] goes low [2] before IRQ#2 is raised [3], Bochs will morph the lowered IRQ#14 interrupt into [4] an spurious IRQ#15 [5].
The aforementioned behavior is produced by line, which will morph any slave interrupt lowered, into an IRQ#15.
I don't know if the behavior I'm describing is intended, but it feels smelly to me, although this has to be well-exercised code path. I'd also like to add that it has been driving me crazy because QEMU treated the interrupt as an IRQ#14.
The logging modifications I've made are available here
Best regards.