Mailbox Inter-domain Communication Protocol¶
- enum xcl_mailbox_request
List of all mailbox request OPCODE. Some OP code requires arguments, which is defined as corresponding data structures below. Response to the request usually is a int32_t containing the error code. Some responses are more complicated and require a data structure, which is also defined below in this file.
Constants
XCL_MAILBOX_REQ_UNKNOWNinvalid OP code
XCL_MAILBOX_REQ_TEST_READYtest msg is ready (post only, internal test only)
XCL_MAILBOX_REQ_TEST_READfetch test msg from peer (internal test only)
XCL_MAILBOX_REQ_LOCK_BITSTREAMlock down xclbin on mgmt pf (not implemented)
XCL_MAILBOX_REQ_UNLOCK_BITSTREAMunlock xclbin on mgmt pf (not implemented)
XCL_MAILBOX_REQ_HOT_RESETrequest mgmt pf driver to reset the board
XCL_MAILBOX_REQ_FIREWALLfirewall trip detected on mgmt pf (post only)
XCL_MAILBOX_REQ_LOAD_XCLBIN_KADDRdownload xclbin (pointed to by a pointer)
XCL_MAILBOX_REQ_LOAD_XCLBINdownload xclbin (bitstream is in payload)
XCL_MAILBOX_REQ_RECLOCKset clock frequency
XCL_MAILBOX_REQ_PEER_DATAread specified data from peer
XCL_MAILBOX_REQ_USER_PROBEfor user pf to probe the peer mgmt pf
XCL_MAILBOX_REQ_MGMT_STATEfor mgmt pf to notify user pf of its state change (post only)
XCL_MAILBOX_REQ_CHG_SHELLshell change is required on mgmt pf (post only)
XCL_MAILBOX_REQ_PROGRAM_SHELLrequest mgmt pf driver to reprogram shell
XCL_MAILBOX_REQ_READ_P2P_BAR_ADDRundescribed
XCL_MAILBOX_REQ_SDR_DATAundescribed
XCL_MAILBOX_REQ_LOAD_XCLBIN_SLOT_KADDRdownload xclbin (pointed to by a pointer) to a specific slot (PS/PL)
XCL_MAILBOX_REQ_LOAD_SLOT_XCLBINdownload xclbin (bitstream is in payload) to a specific slot (PS/PL)
XCL_MAILBOX_REQ_MAXundescribed
- struct xcl_mailbox_req_bitstream_lock
MAILBOX_REQ_LOCK_BITSTREAM and MAILBOX_REQ_UNLOCK_BITSTREAM payload type
Definition
struct xcl_mailbox_req_bitstream_lock {
uint64_t reserved;
uint8_t uuid;
};
Members
reservedreserved for future use
uuiduuid of the xclbin
- enum xcl_group_kind
Groups of data that can be fetched from mgmt side
Constants
XCL_SENSORall kinds of sensor readings
XCL_ICAPICAP IP related information
XCL_BDINFOBoard Info, serial_num, mac_address
XCL_MIG_ECCECC statistics
XCL_FIREWALLAF detected time, status
XCL_DNADevice DNA information
XCL_SUBDEVPLP subdevices information
XCL_SDR_BDINFOundescribed
XCL_SDR_TEMPundescribed
XCL_SDR_VOLTAGEundescribed
XCL_SDR_CURRENTundescribed
XCL_SDR_POWERundescribed
XCL_MULTISLOT_VERSIONundescribed
- struct xcl_board_info
Data structure used to fetch BDINFO group
Definition
struct xcl_board_info {
};
Members
- struct xcl_sensor
Data structure used to fetch SENSOR group
Definition
struct xcl_sensor {
};
Members
- struct xcl_multislot_info
Data structure used to fetch multislot version
Definition
struct xcl_multislot_info {
};
Members
- struct xcl_pr_region
Data structure used to fetch ICAP group
Definition
struct xcl_pr_region {
};
Members
- struct xcl_mig_ecc
Data structure used to fetch MIG_ECC group
Definition
struct xcl_mig_ecc {
};
Members
- struct xcl_firewall
Data structure used to fetch FIREWALL group
Definition
struct xcl_firewall {
};
Members
- struct xcl_dna
Data structure used to fetch DNA group
Definition
struct xcl_dna {
};
Members
- struct xcl_mailbox_subdev_peer
MAILBOX_REQ_PEER_DATA payload type
Definition
struct xcl_mailbox_subdev_peer {
int32_t kind;
uint64_t size;
};
Members
kinddata group (enum xcl_group_kind)
sizebuffer size for receiving response
- struct xcl_mailbox_conn
MAILBOX_REQ_USER_PROBE payload type
Definition
struct xcl_mailbox_conn {
uint64_t kaddr;
uint64_t paddr;
uint32_t crc32;
uint32_t version;
};
Members
kaddrKVA of the verification data buffer
paddrphysical addresss of the verification data buffer
crc32CRC value of the verification data buffer
versionprotocol version supported by peer
- struct xcl_mailbox_conn_resp
MAILBOX_REQ_USER_PROBE response payload type
Definition
struct xcl_mailbox_conn_resp {
uint32_t version;
uint64_t conn_flags;
uint64_t chan_switch;
int8_t comm_id;
};
Members
versionprotocol version should be used
conn_flagsconnection status
chan_switchbitmap to indicate SW / HW channel for each OP code msg
comm_iduser defined cookie
- struct xcl_mailbox_peer_state
MAILBOX_REQ_MGMT_STATE payload type
Definition
struct xcl_mailbox_peer_state {
uint64_t state_flags;
};
Members
state_flagspeer state flags
- struct xcl_mailbox_bitstream_slot_kaddr
MAILBOX_REQ_LOAD_XCLBIN_SLOT_KADDR payload type to pass slot information
Definition
struct xcl_mailbox_bitstream_slot_kaddr {
uint64_t addr;
uint32_t slot_idx;
};
Members
addrpointer to xclbin body
slot_idxTarget slot index
- struct xcl_mailbox_bitstream_kaddr
MAILBOX_REQ_LOAD_XCLBIN_KADDR payload type
Definition
struct xcl_mailbox_bitstream_kaddr {
uint64_t addr;
};
Members
addrpointer to xclbin body
- struct xcl_mailbox_bitstream_slot_xclbin
MAILBOX_REQ_LOAD_SLOT_XCLBIN payload type
Definition
struct xcl_mailbox_bitstream_slot_xclbin {
uint32_t slot_idx;
};
Members
slot_idxTarget slot index
- struct xcl_mailbox_clock_freqscaling
MAILBOX_REQ_RECLOCK payload type
Definition
struct xcl_mailbox_clock_freqscaling {
uint32_t region;
uint16_t target_freqs;
};
Members
regionregion of clock
target_freqsarray of target clock frequencies (max clocks: 16)
- struct xcl_mailbox_req
mailbox request message header
Definition
struct xcl_mailbox_req {
uint64_t flags;
int32_t req;
int32_t data;
};
Members
flagsflags of this message
reqopcode (enum xcl_mailbox_request)
datapayload of variable length
- struct xcl_sw_chan
mailbox software channel message metadata. This defines the interface between daemons (MPD and MSD) and mailbox’s read or write callbacks. A mailbox message (either a request or response) is wrapped by this data structure as payload. A sw_chan is passed between mailbox driver and daemon via read / write driver callbacks. And it is also passed between MPD and MSD via vendor defined interface (TCP socket, etc).
Definition
struct xcl_sw_chan {
uint64_t sz;
uint64_t flags;
uint64_t id;
uint64_t data;
};
Members
szpayload size
flagsflags of this message as in struct mailbox_req
idmessage ID
datapayload (struct mailbox_req or response data matching the request)
- struct xcl_mailbox_p2p_bar_addr
Definition
struct xcl_mailbox_p2p_bar_addr {
};
Members