The initiator should be the PCI device object itself. There are currently no requirements on this object in terms of interfaces. It is intended for future use and could be left NULL.
The 16-bit Requester ID is provided by the rid parameter. This is the ID that uniquely identifies the initiator in a PCIe hierarchy, also more commonly known as the BDF (Bus/Device/Function). This ID can be left blank (0) by non-PCIe devices if the BDF is not known.
Return value is of type exception_type_t
and maps, just like
all other PCI interfaces, onto PCI concepts accordingly:
Other return values are currently unexpected.
SIM_INTERFACE(pci_upstream_operation) { exception_type_t (*read)(conf_object_t *obj, conf_object_t *initiator, uint16 rid, addr_space_t space, physical_address_t address, buffer_t buffer); exception_type_t (*write)(conf_object_t *obj, conf_object_t *initiator, uint16 rid, addr_space_t space, physical_address_t address, bytes_t buffer); }; #define PCI_UPSTREAM_OPERATION_INTERFACE "pci_upstream_operation"