VirtualBox

Opened 7 years ago

Last modified 7 years ago

#16809 new defect

PCI MMIO Address Not Listed In Memory Map

Reported by: SpyderTL Owned by:
Component: other Version: VirtualBox 5.1.22
Keywords: BIOS Memory Map PCI MMIO Cc:
Guest type: Linux Host type: all

Description

When using the ICH9 chipset, the "MCFG" table is added to the ACPI table list, and it has an address of 0xDC000000. However, this address is not included in the memory map returned by INT 15h AX=E820h. This causes Linux to ignore the MMIO PCI area, altogether, and it may cause issues if the OS tries to use this area when reassigning addresses to PCI devices.

Please add the PCI MMIO area, and any other chipset specific memory areas to the memory map returned by E820.

Thanks.

Change History (5)

comment:1 by michaln, 7 years ago

It's not clear what you mean by "the MMIO PCI area", but it doesn't sound like the MCFG range.

The MCFG range is not returned in the E820h table on physical systems either, e.g. ThinkPad T460. If you can point us to some relevant standard documenting that it should be returned (and how exactly), we would be grateful.

comment:2 by SpyderTL, 7 years ago

There is a discussion about this issue over on the osdev forums here: http://forum.osdev.org/viewtopic.php?f=1&t=32039

The area we are talking about is the Memory Mapped (not I/O port) area that allows the OS to access the PCI configuration space. (The 64-bit value located at 44 bytes on the MCFG table.)

The problem with not including this area in the memory map (as reserved) is that the OS may try to use this area to assign PCI device base addresses. It has no way of knowing that this area is not available for PCI device assignment.

I've been told that the ACPI specs state that firmware device addresses should be included in the memory map as reserved, but I haven't looked it up yet.

Devices that can not be reassigned, or that aleady have mechanisms for detecting addresses do not need to be included in the memory map, but the PCI MMIO has no other way of being detected by the OS.

Last edited 7 years ago by SpyderTL (previous) (diff)

comment:3 by SpyderTL, 7 years ago

The ACPI specification section 15.2 defines what addresses should be included in the memory map. It states that the memory map should include "baseboard" memory mapped devices, like APIC devices, as Reserved.

I think this is valid enough to include the PCI MMIO area, since it is the only mechanism the OS an use to find this memory area, and avoid it when assigning device addresses.

Thanks.

comment:4 by SpyderTL, 7 years ago

Also, I just tested this on my HP EliteBook, and it did, indeed, include the PCI MMIO area from the MCFG table in the Memory Map returned by E820h.

comment:5 by michaln, 7 years ago

The ACPI specification is unclear at best. Fortunately the PCI Firmware Specification Revision 3.0 is reasonably clear. This is from the 2007 updated edition, page 42 (notes for table 4-2):

"If the operating system does not natively comprehend reserving the MMCFG region, the MMCFG region must be reserved by firmware. The address range reported in the MCFG table or by _CBA method (see Section 4.1.3) must be reserved by declaring a motherboard resource. For most systems, the motherboard resource would appear at the root of the ACPI namespace (under \_SB) in a node with a _HID of EISAID (PNP0C02), and the resources in this case should not be claimed in the root PCI bus’s _CRS. The resources can optionally be returned in Int15 E820 or EFIGetMemoryMap as reserved memory but must always be reported through ACPI as a motherboard resource."

So no, the MCFG region does not have to be reported through E820h, and no, the E820h memory map is definitely not the only mechanism for an OS to find out where the MCFG region is (actually the OS can't find the MCFG region is that way at all, it must use the ACPI MCFG table).

If you have an OS which does not understand ACPI (or "if the operating system does not natively comprehend reserving the MMCFG region") then do not use it with the PCI Express chipset emulation in VirtualBox.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use