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

pcie_map

Description
This interface is used to claim ranges in PCIe address spaces and to manage virtual functions.

Functions add_map and del_map are used to add and remove maps, map_obj will be mapped in the address space indicated by type according to the information in nfo.

Functions add_function, del_function, enable_function and disable_function are used to add, delete, enable and disable functions, both virtual and physical. The supplied map_obj must be a valid map-target, it will receive both Config and Message transactions. For Message transactions, the device id (not including bus number) will be in bits 55:48 of the 64-bit address. For Config transactions, the device id is not part of the address.

The function get_device_id returns the current device id of dev_obj, as a 16 bit number. Note that the bus number part is saved immediately after the RC/Switch sets it, even if no successful Config-Write has been made.

Note: This interface is considered tech-preview and may change without notice.

SIM_INTERFACE(pcie_map) {
        void (*add_map)(conf_object_t *obj, conf_object_t *map_obj,
                       map_info_t nfo, pcie_type_t type);
        void (*del_map)(conf_object_t *obj, conf_object_t *map_obj,
                       physical_address_t base, pcie_type_t type);
        void (*add_function)(conf_object_t *obj, conf_object_t *map_obj,
                             uint16 function_id);
        void (*del_function)(conf_object_t *obj, conf_object_t *map_obj,
                             uint16 function_id);
        void (*enable_function)(conf_object_t *obj, uint16 function_id);
        void (*disable_function)(conf_object_t *obj, uint16 function_id);
        uint16 (*get_device_id)(conf_object_t *obj, conf_object_t *dev_obj);
};

#define PCIE_MAP_INTERFACE "pcie_map"

Execution Context
Cell Context for all methods.

pcie_link_training pcie_port_control