mcfg

Differences between revisions 1 and 2
Revision 1 as of 2011-08-23 19:32:56
Size: 4122
Editor: colin-king
Comment:
Revision 2 as of 2013-02-25 13:02:13
Size: 4071
Editor: cpc3-craw6-2-0-cust180
Comment:
Deletions are marked like this. Additions are marked like this.
Line 18: Line 18:
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
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.
================================================================================

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.
================================================================================

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.

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