I am trying to configure the PCI IDE device emulated by VirtualBox (v5.0.0) into native PCI mode. It is emulating an Intel PIIX4 device. The 32-bit value at configuration space offset 0x8 is 0x01018a01 i.e. class code 01, subclass 01, programming interface 8a, revision ID 01. According to the PCI IDE specifications the programming interface field means primary and secondary channels are in compatibility mode but both modes are supported. In addition bus mastering is supported. However, when I try and write the value 0x01018f01 (enable native mode for both channels) back to offset 0x8, nothing changes - the value is still 8a when I read it back and bar0-3 are still zero with zero length. Also, by inspecting the pci configuration space with VirtualBox's debugger (info pci verbose) the configuration space has not changed.
This also happens when running a linux distribution from within VirtualBox and trying to use the setpci utility (setpci -s 00:01.1 08.l=0x01018f01). Out of interest I can write to the control register and that does change (and show up in the debugger as being changed).
Has anyone managed to get the VirtualBox IDE device to switch into native mode? If not unless anyone can see what I'm doing wrong with trying to set it up I'll put it down to a bug in the emulation.
Regards,
John.
PCI IDE in native mode on VirtualBox
Re: PCI IDE in native mode on VirtualBox
The source is online at virtualbox.org. You can see for yourself what that pci register does when you change it.
Project: OZone
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Source: GitHub
Current Task: LIB/OBJ file support
"The more they overthink the plumbing, the easier it is to stop up the drain." - Montgomery Scott
Re: PCI IDE in native mode on VirtualBox
Thanks, I had already tried that but the VirtualBox source is close to that of Linux in terms of obfustication. From what I can gather though, the pci ide driver does not override the default pci_default_write_config function, which specifically ignores writes to config space addresses 0x8, 0x9, 0xa and 0xb (amongst others).
Has anyone implemented a PCI IDE driver that switches mode, and is it as easy as checking whether mode switching is available before altering the programming interface field? If so, then I guess I'll file a bug with VirtualBox.
Regards,
John.
Has anyone implemented a PCI IDE driver that switches mode, and is it as easy as checking whether mode switching is available before altering the programming interface field? If so, then I guess I'll file a bug with VirtualBox.
Regards,
John.