pcie_device pcie_link_training
API Reference Manual  /  4 Model-to-Model Interfaces  / 

pcie_hotplug_events

Description
This interface should be implemented by Hot-Plug capable Downstream Ports. Such devices should be either a Downstream Port of a PCI Express Switch or a Root Port of PCI Express Root Complex.

The device that implements this interface should on the invocation of any of the methods in this interface should do the following:

1. If the applicable Hot-Plug capability has been enabled, set the new value of the corresponding Hot-Plug event in the applicable register. 2. If the value changed from its previous value, set the changed register value for the applicable Hot-Plug event. 3. If the value changed from its previous value, notify software using an interrupt if notifications are enabled for the applicable Hot-Plug event and an interrupt mechanism has been configured by the software (MSI/MSI-X or PCI-compatible INTx Emulation).

The presence_change() method is called by the pcie-downstream-port (if its upstream target implements this interface) when it goes from having no adapter present to having an adapter present and vice versa.

SIM_INTERFACE(pcie_hotplug_events) {
        void (*presence_change)(conf_object_t *obj, pcie_hotplug_pd_t state);
        void (*power_fault)(conf_object_t *obj);
        void (*attention_button_pressed)(conf_object_t *obj);
        void (*mrl_sensor)(conf_object_t *obj, pcie_hotplug_mrl_t state);
        void (*data_link_layer)(conf_object_t *obj, bool is_active);
};

#define PCIE_HOTPLUG_EVENTS_INTERFACE "pcie_hotplug_events"

Execution Context
Cell Context for all methods.

pcie_device pcie_link_training