Firmware Test Suite - mcfg test

The mcfg test validates the ACPI PCI Express memory mapped configuration space base address Description Table (MCFG) table (see PCI Firmware Specification, Revision 3.0). The test performs several checks:

  • Validates the MCFG table size.
  • Validates the MCFG entries.
  • For each entry in the MCFG it attempts to check that the MMIO config space is reserved in the memory map.

The PCI Express specification states that the PCI Express configuration space should be defined in the MCFG table and *maybe* optionally reserved in the firmware defined memory map if ACPI MCFG is present. Traidionally Linux checked if the region is reserved in the memory map table and would reject the MMCONFIG if there is a discrepancy between MCFG and the memory map table for the PCI Express region. [See arch/x86/pci/mmconfig-shared.c pci_mmcfg_reject_broken()]. It is recommended that this is defined in the firmware memory map (e.g. Int 15 AX=E820) table for Linux.

Example output:

MCFG PCI Express* memory mapped config space.
Test 1 of 2: Validate MCFG table.
This test tries to validate the MCFG table by comparing the first 16 bytes in
the MMIO mapped config space with the 'traditional' config space of the first
PCI device (root bridge). The MCFG data is only trusted if it is marked reserved
in the Int 15 AX=E820 BIOS memory map

Memory Map Layout
0x0000000000000000 - 0x000000000009d7ff (System RAM)
0x000000000009d800 - 0x000000000009ffff (reserved)
0x00000000000e0000 - 0x00000000000fffff (reserved)
0x0000000000100000 - 0x000000001fffffff (System RAM)
0x0000000020000000 - 0x00000000201fffff (reserved)
0x0000000020200000 - 0x0000000040003fff (System RAM)
0x0000000040004000 - 0x0000000040004fff (reserved)
0x0000000040005000 - 0x00000000d067ffff (System RAM)
0x00000000d0680000 - 0x00000000dae9efff (reserved)
0x00000000dae9f000 - 0x00000000daf9efff (ACPI Non-volatile Storage)
0x00000000daf9f000 - 0x00000000daffefff (ACPI Non-volatile Storage)
0x00000000dafff000 - 0x00000000df9fffff (reserved)
0x00000000f8000000 - 0x00000000fbffffff (reserved)
0x00000000fec00000 - 0x00000000fec00fff (reserved)
0x00000000fed08000 - 0x00000000fed08fff (reserved)
0x00000000fed10000 - 0x00000000fed19fff (reserved)
0x00000000fed1c000 - 0x00000000fed1ffff (reserved)
0x00000000fee00000 - 0x00000000fee00fff (reserved)
0x00000000ffc00000 - 0x00000000ffffffff (reserved)
0x0000000100000000 - 0x000000019e5fffff (System RAM)
0x000000019e600000 - 0x000000019e7fffff (reserved)

MCFG table found, size is 16 bytes (excluding header) (1 entries).
Configuration Entry #0:
  Base Address  : 0xf8000000
  Segment       : 0
  Start bus     : 0
  End bus       : 63
PASSED: Test 1, MCFG mmio config space is reserved in memory map table.

Test 2 of 2: Validate MCFG PCI config space.
PASSED: Test 2, PCI config space verified.

2 passed, 0 failed, 0 warnings, 0 aborted, 0 skipped, 0 info only.


sudo fwts mcfg - 

..runs the test on your machine and dumps the output to stdout.

Explanation of test results

Certain test results may require a little more explanation. This section will try and give some context to specific test failures.

Error ID



Cannot verify PCI configuration space.


ACPI MCFG table size is invalid (smaller or equal to the MCFG header size).


ACPI MCFG table contains no entries, this is invalid.


ACPI MCFG does not contain an integer multiple of MCFG entries. Table the wrong size.


ACPI MCFG is unreadable.


Cannot read the firmware memory map.

FirmwareTestSuite/Reference/mcfg (last edited 2016-01-11 07:24:32 by anthonywong)