/* * PF<->VF Gen2 Messaging format * * The PF has an array of 32-bit PF2VF registers, one for each VF. The * PF can access all these registers while each VF can access only the one * register associated with that particular VF. * * The register functionally is split into two parts: * The bottom half is for PF->VF messages. In particular when the first * bit of this register (bit 0) gets set an interrupt will be triggered * in the respective VF. * The top half is for VF->PF messages. In particular when the first bit * of this half of register (bit 16) gets set an interrupt will be triggered * in the PF. * * The remaining bits within this register are available to encode messages. * and implement a collision control mechanism to prevent concurrent use of * the PF2VF register by both the PF and VF. * * 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 * _______________________________________________ * | | | | | | | | | | | | | | | | | * +-----------------------------------------------+ * \___________________________/ \_________/ ^ ^ * ^ ^ | | * | | | VF2PF Int * | | Message Origin * | Message Type * Message-specific Data/Reserved * * 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 * _______________________________________________ * | | | | | | | | | | | | | | | | | * +-----------------------------------------------+ * \___________________________/ \_________/ ^ ^ * ^ ^ | | * | | | PF2VF Int * | | Message Origin * | Message Type * Message-specific Data/Reserved * * Message Origin (Should always be 1) * A legacy out-of-tree QAT driver allowed for a set of messages not supported * by this driver; these had a Msg Origin of 0 and are ignored by this driver. * * When a PF or VF attempts to send a message in the lower or upper 16 bits, * respectively, the other 16 bits are written to first with a defined * IN_USE_BY pattern as part of a collision control scheme (see function * adf_gen2_pfvf_send() in adf_pf2vf_msg.c). * * * PF<->VF Gen4 Messaging format * * Similarly to the gen2 messaging format, 32-bit long registers are used for * communication between PF and VFs. However, each VF and PF share a pair of * 32-bits register to avoid collisions: one for PV to VF messages and one * for VF to PF messages. * * Both the Interrupt bit and the Message Origin bit retain the same position * and meaning, although non-system messages are now deprecated and not * expected. * * 31 30 9 8 7 6 5 4 3 2 1 0 * _______________________________________________ * | | | . . . | | | | | | | | | | | * +-----------------------------------------------+ * \_____________________/ \_______________/ ^ ^ * ^ ^ | | * | | | PF/VF Int * | | Message Origin * | Message Type * Message-specific Data/Reserved * * For both formats, the message reception is acknowledged by lowering the * interrupt bit on the register where the message was sent.
*/
/* Different generations have different CSR layouts, use this struct * to abstract these differences away
*/ struct pfvf_message {
u8 type;
u32 data;
};
/* PF->VF messages */ enum pf2vf_msgtype {
ADF_PF2VF_MSGTYPE_RESTARTING = 0x01,
ADF_PF2VF_MSGTYPE_VERSION_RESP = 0x02,
ADF_PF2VF_MSGTYPE_BLKMSG_RESP = 0x03,
ADF_PF2VF_MSGTYPE_FATAL_ERROR = 0x04,
ADF_PF2VF_MSGTYPE_RESTARTED = 0x05, /* Values from 0x10 are Gen4 specific, message type is only 4 bits in Gen2 devices. */
ADF_PF2VF_MSGTYPE_RP_RESET_RESP = 0x10,
};
/* VF->PF messages */ enum vf2pf_msgtype {
ADF_VF2PF_MSGTYPE_INIT = 0x03,
ADF_VF2PF_MSGTYPE_SHUTDOWN = 0x04,
ADF_VF2PF_MSGTYPE_VERSION_REQ = 0x05,
ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ = 0x06,
ADF_VF2PF_MSGTYPE_LARGE_BLOCK_REQ = 0x07,
ADF_VF2PF_MSGTYPE_MEDIUM_BLOCK_REQ = 0x08,
ADF_VF2PF_MSGTYPE_SMALL_BLOCK_REQ = 0x09,
ADF_VF2PF_MSGTYPE_RESTARTING_COMPLETE = 0x0a, /* Values from 0x10 are Gen4 specific, message type is only 4 bits in Gen2 devices. */
ADF_VF2PF_MSGTYPE_RP_RESET = 0x10,
};
/* VF/PF compatibility version. */ enum pfvf_compatibility_version { /* Support for extended capabilities */
ADF_PFVF_COMPAT_CAPABILITIES = 0x02, /* In-use pattern cleared by receiver */
ADF_PFVF_COMPAT_FAST_ACK = 0x03, /* Ring to service mapping support for non-standard mappings */
ADF_PFVF_COMPAT_RING_TO_SVC_MAP = 0x04, /* Fallback compat */
ADF_PFVF_COMPAT_FALLBACK = 0x05, /* Reference to the latest version */
ADF_PFVF_COMPAT_THIS_VERSION = 0x05,
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.