Bug #14238


Remove vestigial mcfg related pieces

Added by Robert Mustacchi 18 days ago. Updated 18 days ago.

driver - device drivers
Start date:
Due date:
% Done:


Estimated time:
Gerrit CR:


In the PCIe initialization code and npe, there are two pieces of vestigial logic that exist relating to the mcfg base that we should remove. Before we get to that, some background. PCIe defines a platform-specific mechanism for accessing memory mapped configuration space. The way this is communicated to the operating system is platform specific. On systems with ACPI, this is generally done through the mcfg table. This table is found early in boot in fakebop.c and is passed onto the general PCI code.

Much later in boot (relatively speaking), there are two places that come back and try to make further notes of this, which are basically storing information that is never used.

1. The pcie_bus_t has a bus_cfgacc_base member. This was only ever consumed on SPARC. So x86 systems set it and then proceeded to ignore it. Because the cfgacc mechanism is naturally platform specific (e.g. on x86 it has the option of falling back to I/O ports) there isn't much value for us keeping this member here.

2. npe goes through and adds an 'ecfg' property that tries to communicate information about things. This has a bit of sordid history and a lot of what it attempted to do, poorly, was cleaned up in #6859. While the comment says that something later in boot will use this, that isn't true at all. Nothing else will. So we can remove an unneeded ACPI dependency from npe (making it easier to move to other archs in the future) and get rid of some code that confuses the reader.

Related issues

Related to illumos gate - Bug #6859: missing MCFG table should lead to I/O PCIe config accessClosedJoshua M. Clulow2016-04-07

Actions #1

Updated by Robert Mustacchi 18 days ago

  • Subject changed from Remove vistigial mcfg related pieces to Remove vestigial mcfg related pieces
Actions #2

Updated by Joshua M. Clulow 18 days ago

  • Related to Bug #6859: missing MCFG table should lead to I/O PCIe config access added

Also available in: Atom PDF