Search code examples
operating-systemvirtualboxpci-eacpi

Question on PCI Express(PCIe) configuration space access on VirtualBox


Hi I'm trying to access the PCIe configuration space with MMIO method on a kernel base.

Before I drop my question, my platform is Windows 10, VirtualBox 6.0.10.

My virtual machine set as default except the following:

  1. chipset choosed ICH9
  2. Core number set to 4
  3. Memory set to 1GB
  4. Added IDE controller(no HD connected)

After boot, the printing shows that valid memory address are:0x0~0x9FC00 and 0x100000~0x3FEF0000 as displayed in following screen shot.

enter image description here

While type 1 is RAM, 2 is ROM or Reserved, 3 is ACPI Reclaim Memory and 4 is ACPI NVS Memory.

Furthermore I retrieved base address of the PCIe configuration memory map base address from MCFG as showed in the following screen shot.

enter image description here

It can be seen that:

  1. The configuration space base is 0x3F000000 which overlap with the valid memory space.
  2. The first 8 byte of 0x3F000000~0x3F000008 is all 0, which should be first 8 byte of bus:0, device:0, function:0.

So whether I should not use VirtualBox, or I should do some other operations to enable PCIe MMIO accessibility of configuration space?

Thanks so much!!


Solution

  • You've probably parsed the "MFCG ACPI table" incorrectly, or used the wrong (virtual?) address for the "MFCG ACPI table" and forgot to check signature and checksum.

    The "Base_addr:" doesn't make sense, and the "Start_PCI_bus: 0, End_PCI_bus: 0" doesn't make sense either.