pci_interrupt pci_upstream
API Reference Manual  /  4 Model-to-Model Interfaces  / 

pci_multi_function_device

Description
This interface is intended for PCI devices that want to have multiple functions implemented within the same device instance, as compared to the scheme of having each PCI function defined in a separate instance.

supported_functions is called from the pci-bus to find out how many functions are supported by this device. The expected return value is a list of tuples, where each tuple contains the PCI function number followed by one or two elements controlling what to map into the bus' config-space. The list can consist of any number of tuples using any and all of the supported formats:

The list can contain a mix of formats, each entry corresponds to a unique mapping of a function.

For ARI enabled PCIe devices, the device number is assumed to be zero thus it is an error to try to claim a function number greater than seven while connecting with a device number greater than zero.

SIM_INTERFACE(pci_multi_function_device) {
        attr_value_t (*supported_functions)(conf_object_t *obj);
};
#define PCI_MULTI_FUNCTION_DEVICE_INTERFACE "pci_multi_function_device"

Execution Context
Global Context for all methods.

pci_interrupt pci_upstream