BIOS initialization of PCIe switch in ICH9-VM

Discussions related to using the OSE version of VirtualBox.

BIOS initialization of PCIe switch in ICH9-VM

Postby RicV » 30. Mar 2016, 19:25

I have a virtual device plugged in through PDM which models a PCIe switch and downstream endpoint. The switch part works correctly with a VM based on PIIX3 chipset, and the guest can access the endpoint through the switch. However, as determined in another thread, the PIIX3 chipset does not support MSI interrupts which is required in my case, so I have moved to the ICH9 chipset instead.

My problem is that the BIOS on this ICH9 VM is apparently not initializing the switch correctly. The BIOS should be responsible for programming the switch'es PCI Configuration registers as it enumerates the bus hierarchy, and this was seen on the PIIX3-VM. On the ICH9-VM, the BIOS reads a few identification registers, then reads the Secondary Bus register, and then enters a loop repeating that sequence for just over 5000 iterations before aborting the VM session.

Code: Select all   Expand viewCollapse view
PCI CFG Root  Rd 0x0a L 2 = 0x0604     // Class
PCI CFG Root  Rd 0x00 L 2 = 0x14ab     // VendID
PCI CFG Root  Rd 0x02 L 2 = 0x1000     // DevID
PCI CFG Root  Wr 0x1c L 1 = 0xd0       // IOBase
PCI CFG Root  Wr 0x20 L 2 = 0xf000     // MemBase
PCI CFG Root  Rd 0x19 L 1 = 0x00       // SecBus
BIOS init device: 00:00.0
BIOS init bridge: 00::00.0

Now I know the SecBus should be 3 in this VM, so I hacked my code to intercept SecBus reads and return 3. Having made that change, the VM now boots and runs correctly as far as I can tell, so I can make progress with my endpoint design.

But is this a bug in the BIOS?

Log files are attached. Lines bearing the “RicV” prefix were instrumented by me to investigate this problem. Lines bearing the “RemDev” prefix are coming from my PDM plug-in callbacks.

Environment: VBox 5.0.16 built from OSE tarball in the downloads page, running on Ubuntu 14 host, with Ubuntu 14 guest.
(44.76 KiB) Downloaded 20 times
Posts: 96
Joined: 25. Aug 2015, 17:58
Location: Lake Tahoe, California
Primary OS: Ubuntu other
VBox Version: OSE self-compiled
Guest OSses: Linux *.*, Win*

Return to VirtualBox OSE

Who is online

Users browsing this forum: No registered users and 1 guest