get_device_id returns the device id of the function.
get_upstream_target returns the upstream target of the PCIe device the PCIe function belongs to.
is_virtual_function returns true if the function is a virtual function.
get_bar_map_obj returns the object that is mapped by the BAR at bar_offset. If there is no BAR register at bar_offset, NULL is returned. For a physical function, the bar_offset is the offset in the Type 0/1 Configuration Space Header. For a virtual function, the bar_offset is the offset in the SR-IOV Extended Capability structure of the associated physical function (starting at 0x24).
SIM_INTERFACE(pcie_function_info)
{
uint16 (*get_device_id)(conf_object_t *obj);
conf_object_t *(*get_upstream_target)(conf_object_t *obj);
bool (*is_virtual_function)(conf_object_t *obj);
conf_object_t *(*get_bar_map_obj)(conf_object_t *obj, uint8 bar_offset);
};
#define PCIE_FUNCTION_INFO_INTERFACE "pcie_function_info"