I recently started to code a driver for the BusLogic SCSI controller and have made it quite far along, albeit polling the Interrupt register. I am now to the point where I wish to allow my interrupt handler to handle the completions.
However, despite everything I can think of, including studying the VirtualBox BusLogic code[1], I cannot seem to see an interrupt when the Adapter sets bit 7 in the INTERRUPT register.
I have placed a lot of debug messages throughout my system, including my system's interrupt handler, and from what I can tell, the VirtualBox BusLogic emulation is not firing an interrupt when it calls PDMDevHlpPCISetIrq() for the BusLogic Adapter.
I have tried changing many settings to no avail.
In fact, when changing the System:Chipset setting from ICH9 to PIIX3, it appears that the BusLogic controller is no longer present in the PCI configuration space. Does the BusLogic Adapter require the ICH9? It shouldn't since it predates the ICH9 by quite a bit.
I have disabled the I/O APIC, using the Legacy PIC8259 and still don't get an interrupt.
Yes, I have done the obvious things:
CPU interrupts are enabled; PIC is unmasked (I see all other interrupts); Cleared the Interrupt bit by writing to the BusLogic CONTROL register; Made sure the Interrupt was Level Triggered (both 8259 and I/O APIC); Even if there is a redirect entry, I am still not getting that redirected interrupt to fire.
To test, at the first of my driver, I read the INTERRUPT register, clearing it if needed, then sending the TEST_COMPLETION_BIT command, which should simply set the two corresponding bits in the INTERRUPT register (the Interrupt Valid and Command Complete bits) and--this is the important part--*Fire and Interrupt*. This process is confirmed on page 24 of the BT-958D specs, Bit 2 Command Complete (CMDC) description:
After a thorough investigation on the Guest side, I can only imagine, though am not implying, that it must be the host's emulation. Therefore, I am asking if anyone here can confirm that they are getting interrupts from the BusLogic BT-958D emulation of VirtualBox."This bit is qualified by the Interrupt Valid bit (INTV) also being set and by the generation of a bus interrupt signal."
I am using the latest version of VirtualBox and Extensions on a Windows 10 Host.
Storage is the BusLogic BT-958D emulation, with two ports, one VHD file and one ISO file attached, and a Floppy Controller and disk to boot so as to not use the Buslogic controller's BIOS code. This is so I have a "fresh" BusLogic emulation to do my checks.
I have turned off USB, Network, and other emulation so there are no conflicts.
I have turned off the I/O APIC and am forcing the emulation to use the PIC8259 Controller to (hopefully) eliminate the APIC as a culprit.
Therefore, will someone please verify that they are actually getting a hardware interrupt on IRQ 11 (the PCI LINE register) when the INTERRUPT VALID bit becomes set in the Virtual Box BusLogic Emulation?
Thank you,
Ben
[1] First day, first post. Can't post link, but the file name is "browser->vbox->trunk->src->VBox->Devices->Storage->DevBusLogic.cpp"