mcfg

Revision 1 as of 2011-08-23 19:32:56

Clear message

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:

00013 mcfg            MCFG PCI Express* memory mapped config space.
00014 mcfg            -------------------------------------------------------------------
00015 mcfg            Test 1 of 1: Validate MCFG table.
00016 mcfg            This test tries to validate the MCFG table by comparing the first 16
00017 mcfg            bytes in the MMIO mapped config space with the 'traditional' config
00018 mcfg            space of the first PCI device (root bridge). The MCFG data is only
00019 mcfg            trusted if it is marked reserved in the Int 15 AX=E820 BIOS memory
00020 mcfg            map
00021 mcfg            
00022 mcfg            Memory Map Layout
00023 mcfg            -----------------
00024 mcfg            0000000000000000 - 000000000009f7ff (System RAM)
00025 mcfg            000000000009f800 - 000000000009ffff (reserved)
00026 mcfg            00000000000d2000 - 00000000000d3fff (reserved)
00027 mcfg            00000000000dc000 - 00000000000fffff (reserved)
00028 mcfg            0000000000100000 - 00000000bf6cffff (System RAM)
00029 mcfg            00000000bf6d0000 - 00000000bf6e2fff (ACPI Non-volatile Storage)
00030 mcfg            00000000bf6e3000 - 00000000bfffffff (reserved)
00031 mcfg            00000000e0000000 - 00000000efffffff (reserved)
00032 mcfg            00000000fec00000 - 00000000fec0ffff (reserved)
00033 mcfg            00000000fed00000 - 00000000fed003ff (reserved)
00034 mcfg            00000000fed14000 - 00000000fed19fff (reserved)
00035 mcfg            00000000fed1c000 - 00000000fed8ffff (reserved)
00036 mcfg            00000000fee00000 - 00000000fee00fff (reserved)
00037 mcfg            00000000ff000000 - 00000000ffffffff (reserved)
00038 mcfg            
00039 mcfg            MCFG table found, size is 16 bytes (excluding header) (1 entries).
00040 mcfg            Entry address : 0xe0000000 
00041 mcfg            High  address : 0x0 
00042 mcfg            Segment       : 0 
00043 mcfg            Start bus     : 0 
00044 mcfg            End bus       : 255 
00045 mcfg            PASSED: Test 1, MCFG mmio config space is reserved in memory map
00046 mcfg            table.
00047 mcfg            PASSED: Test 1, PCI config space verified
00048 mcfg            

Examples:

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

Explanation

PCIConfigSpaceBad

Cannot verify PCI configuration space.

MCFGInvalidSize

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

MCFGNoEntries

ACPI MCFG table contains no entries, this is invalid.

MCFGInvalidSize2

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

MCFGInvalidTable

ACPI MCFG is unreadable.

MMapUnreadable

Cannot read the firmware memory map.