SIM_INTERFACE(rapidio_v3) { void (*memory_operation)(conf_object_t *obj, uint16 destination, uint16 source, physical_address_t addr, dbuffer_t *buf, rapidio_operation_t op); void (*doorbell)(conf_object_t *obj, uint16 destination, uint16 source, uint16 data); void (*deliver_message)(conf_object_t *obj, uint16 destination, uint16 source, uint16 mbox, uint16 letter, dbuffer_t *data); uint32 (*read_register)(conf_object_t *obj, uint16 destination, uint16 source, uint8 hopcount, int reg_no); void (*write_register)(conf_object_t *obj, uint16 destination, uint16 source, uint8 hopcount, int reg_no, uint32 value); void (*port_write)(conf_object_t *obj, uint16 target_id, uint16 source_id, uint8 hopcount, dbuffer_t *msg); }; #define RAPIDIO_V3_INTERFACE "rapidio_v3"
The interface is designed for peer-to-peer communication. Switches and devices will use the same interface.
The doorbell method corresponds to a DOORBELL/DONE packet pair, while deliver_message denotes a non-fragmented message. On the physical line this will be split into 256-byte MESSAGE packets acknowledged by a DONE packet.
read_register and write_register is the way to simulate MAINTENANCE operations.
I/O accesses are done using the memory_operation function, which will encode the operation in the op argument. The valid values are listed below.
typedef enum { RapidIO_Read, RapidIO_Write, RapidIO_Increment, RapidIO_Decrement, RapidIO_Test_and_Swap, RapidIO_Set, RapidIO_Clear, RapidIO_Compare_and_Swap, RapidIO_Swap } rapidio_operation_t;
The size of the buf argument decides the transaction size and the addr argument dictates where the access is made. The dbuffer buf serves as both incoming data and a place where the receiver can store read data. The bytes of a increment or decrement operation is in big endian order in the dbuffer.
port_write corresponds to PORT_WRITE packet, with all arguments stored in big endian order in the dbuffer argument. Typically this is the four 32-bit words component_tag_csr, port_error_detect_csr, port_id and transport_layer_error_detect_csr.
This interface has been superseded by rapidio_v4
. Cache
control packets like IO_READ_HOME and FLUSH are not supported yet. Error
reporting is not supported.