Module loading

Updated: May 06, 2022

Module loading is implicit, meaning that any code using the libpci APIs loads the required modules automatically. This eliminates the need for drivers to perform any PCI-related module management.

Which modules are loaded is controlled by environment variables. At the time of module loading, if the environment variable associated with that module isn't set, the functionality is deemed unnecessary, and there are no further attempts to load the module. The exception to this is the hardware-dependent module; failure to set the PCI_HW_MODULE environment variable results in a SIGSEGV.

Capability module loading is similar in that there's no module management required of driver software, but it differs slightly in that driver software does get to explicitly trigger when a capability module is loaded. The Capability Modules appendix contains more details on this process.