connected and disconnected are used to indicate that
the device is (dis)connected to port_obj with device id
device_id and may use the pcie_map interface to
add/remove functions and claim/release other resources. These functions
should only be called once for each (dis)connected physical device no matter
how many physical or virtual functions it has. The device_id
contains the device number (D part of B:D:F) and should use 0 as the function
number (F part of B:D:F).
hot_reset is used to indicate that a Hot Reset has been signaled
on the PCIe link to which the device is connected. It is up to the device to
reset functions and other resources mapped using the pcie_map
interface.
Note: This interface is considered tech-preview and may change without notice.
SIM_INTERFACE(pcie_device) {
void (*connected)(conf_object_t *obj, conf_object_t *port_obj,
uint16 device_id);
void (*disconnected)(conf_object_t *obj, conf_object_t *port_obj,
uint16 device_id);
void (*hot_reset)(conf_object_t *obj);
};
#define PCIE_DEVICE_INTERFACE "pcie_device"