Bochs and interrupts (OHCI trouble)
Posted: Wed Sep 12, 2012 1:27 pm
Hi,
My first post here. I am having fun writing a kernel, and I use Bochs and Virtualbox to emulate hardware. I have written an OHCI driver which works on VirtualBox, but when I try the same thing on Bochs it hangs right after i enable all interrupts (except SOF, like explained in 5.1.1.4 in the OHCI definition). It works in VirtualBox.
Even stranger: When I don't enable the interrupts it works in Bochs, but now HcInterruptStatus never changes in VirtualBox, so then it doesn't work there. I don't understand this either, as I understand that HcInterruptEnable is not needed for HcInterruptStatus to be set, it just means that if it is set a hardware interrupt is generated.
(From 7.1.4:
When a bit becomes set, a
hardware interrupt is generated if the interrupt is enabled in the HcInterruptEnable register (see
Section 7.1.5) and the MasterInterruptEnable bit is set
)
My conclusion is that I am doing something wrong, but I have followed the specification close (I think), and it actually works on both Bochs and VB - but not with the same kernel! Any suggestions from more experienced os developers out there?
Edit: Changed HcInterruptStatus to HcInterruptEnable
My first post here. I am having fun writing a kernel, and I use Bochs and Virtualbox to emulate hardware. I have written an OHCI driver which works on VirtualBox, but when I try the same thing on Bochs it hangs right after i enable all interrupts (except SOF, like explained in 5.1.1.4 in the OHCI definition). It works in VirtualBox.
Even stranger: When I don't enable the interrupts it works in Bochs, but now HcInterruptStatus never changes in VirtualBox, so then it doesn't work there. I don't understand this either, as I understand that HcInterruptEnable is not needed for HcInterruptStatus to be set, it just means that if it is set a hardware interrupt is generated.
(From 7.1.4:
When a bit becomes set, a
hardware interrupt is generated if the interrupt is enabled in the HcInterruptEnable register (see
Section 7.1.5) and the MasterInterruptEnable bit is set
)
My conclusion is that I am doing something wrong, but I have followed the specification close (I think), and it actually works on both Bochs and VB - but not with the same kernel! Any suggestions from more experienced os developers out there?
Edit: Changed HcInterruptStatus to HcInterruptEnable