29#define HEALTH_INFO_REQ_PL_LEN 0
30#define GET_FW_INFO_REQ_PL_LEN 0
31#define TRANSFER_FW_REQ_PL_LEN 256
32#define ACTIVATE_FW_REQ_PL_LEN 2
35#define HEALTH_INFO_RESP_PL_LEN 18
36#define GET_FW_INFO_RESP_PL_LEN 80
37#define TRANSFER_FW_RESP_PL_LEN 0
38#define ACTIVATE_FW_RESP_PL_LEN 0
40#define GET_FW_INFO_RESV_LEN 13
41#define GET_FW_INFO_REVISION_LEN 16
42#define TRANSFER_FW_RESV_LEN 120
43#define TRANSFER_FW_DATA_LEN 128
60 uint8_t cci_msg_req_resp;
75 void (*recv_resp_cb_fn)(
void *, uint8_t *, uint16_t, uint16_t);
78 void (*timeout_cb_fn)(
void *);
82typedef uint8_t (*
mctp_cci_cmd_fn)(
void *, uint8_t *, uint16_t, uint8_t *, uint16_t *,
void *);
83typedef uint8_t (*
cci_cmd_proc_fn)(
void *, uint8_t *, uint16_t, uint8_t *, uint16_t *,
void *);
90#define DEV_TEMP_OFFSET 16
91#define CCI_CC_INVALID_INPUT 0x0002
96#define CCI_CC_SUCCESS 0x0000
97#define CCI_CC_INVALID_INPUT 0x0002
98#define CCI_CC_PAYLOAD_INVALID_LEN 0x0016
103#define CCI_SUCCESS 0x0000
104#define CCI_ERROR 0x0001
105#define CCI_INVALID_TYPE 0x0002
119 uint8_t *return_len);
129 uint8_t health_status;
130 uint8_t media_status;
131 uint8_t additional_status;
134 uint32_t shutdown_cnt;
135 uint32_t volatile_mem_err_cnt;
136 uint32_t persistent_mem_err_cnt;
struct _cci_recv_resp_arg cci_recv_resp_arg
mctp_cci_hdr
Definition: cci.h:69
int pal_get_cci_timeout_ms()
Definition: plat_mctp.c:406
bool cci_get_chip_fw_version(void *mctp_p, mctp_ext_params ext_params, uint8_t *fw_version, uint8_t *return_len)
uint8_t mctp_cci_cmd_handler(void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params)
ACTIVATE_FW_OPTION
Definition: cci.h:186
@ NEXT_COLD_RESET_ACTIVE_FW
Definition: cci.h:188
@ ONLINE_ACTIVE_FW
Definition: cci.h:187
ACTIVE_FW_SLOT
Definition: cci.h:171
@ SLOT3_FW_ACTIVE
Definition: cci.h:174
@ SLOT1_FW_ACTIVE
Definition: cci.h:172
@ SLOT2_FW_ACTIVE
Definition: cci.h:173
@ SLOT4_FW_ACTIVE
Definition: cci.h:175
struct _cci_fw_info_resp cci_fw_info_resp
int pal_get_cci_internal_ms()
bool cci_get_chip_temp(void *mctp_p, mctp_ext_params ext_params, int16_t *chip_temp)
#define TRANSFER_FW_RESV_LEN
Definition: cci.h:42
uint8_t(* mctp_cci_cmd_fn)(void *, uint8_t *, uint16_t, uint8_t *, uint16_t *, void *)
Definition: cci.h:82
#define GET_FW_INFO_REVISION_LEN
Definition: cci.h:41
struct _cci_transfer_fw_req cci_transfer_fw_req
struct _cci_activate_fw_req cci_activate_fw_req
CCI_CMD
Definition: cci.h:21
@ CCI_ACTIVATE_FW
Definition: cci.h:25
@ CCI_TRANSFER_FW
Definition: cci.h:24
@ CCI_GET_FW_INFO
Definition: cci.h:23
@ CCI_GET_HEALTH_INFO
Definition: cci.h:22
void cci_read_resp_handler(void *args, uint8_t *rbuf, uint16_t rlen, uint16_t ret_code)
struct _mctp_cci_cmd_handler mctp_cci_cmd_handler_t
uint8_t(* cci_cmd_proc_fn)(void *, uint8_t *, uint16_t, uint8_t *, uint16_t *, void *)
Definition: cci.h:83
struct _wait_msg wait_msg
uint16_t mctp_cci_read(void *mctp_p, mctp_cci_msg *msg, uint8_t *rbuf, uint16_t rbuf_len)
#define GET_FW_INFO_RESV_LEN
Definition: cci.h:40
cci_health_info_resp
Definition: cci.h:137
#define TRANSFER_FW_DATA_LEN
Definition: cci.h:43
TRANSFER_FW_OPTION
Definition: cci.h:178
@ END_TRANSFER
Definition: cci.h:182
@ CONTINUE_FW_TRANSFER
Definition: cci.h:181
@ INITIATE_FW_TRANSFER
Definition: cci.h:180
@ FULL_FW_TRANSFER
Definition: cci.h:179
@ ABORT_TRANSFER
Definition: cci.h:183
uint8_t mctp_cci_send_msg(void *mctp_p, mctp_cci_msg *msg)
uint8_t op
Definition: mctp_ctrl.h:0
uint8_t rsv
Definition: pldm_monitor.h:2
Definition: pldm_smbios.h:61
uint8_t action
Definition: cci.h:167
uint8_t slot
Definition: cci.h:168
union _cci_fw_info_resp::@44 fw_slot_info
uint8_t ACTIVE_FW_SLOT
Definition: cci.h:144
uint8_t slot3_fw_revision[GET_FW_INFO_REVISION_LEN]
Definition: cci.h:153
uint8_t RESV
Definition: cci.h:146
struct _cci_fw_info_resp::@44::@45 fields
uint8_t reserved[GET_FW_INFO_RESV_LEN]
Definition: cci.h:150
uint8_t NEXT_ACTIVE_FW_SLOT
Definition: cci.h:145
uint8_t fw_slot_supported
Definition: cci.h:140
uint8_t value
Definition: cci.h:142
uint8_t fw_active_capability
Definition: cci.h:149
uint8_t slot4_fw_revision[GET_FW_INFO_REVISION_LEN]
Definition: cci.h:154
uint8_t slot1_fw_revision[GET_FW_INFO_REVISION_LEN]
Definition: cci.h:151
uint8_t slot2_fw_revision[GET_FW_INFO_REVISION_LEN]
Definition: cci.h:152
void(* handler_query)(uint8_t *, uint16_t)
Definition: cci.h:47
CCI_CMD type
Definition: cci.h:46
uint16_t rbuf_len
Definition: cci.h:53
struct k_msgq * msgq
Definition: cci.h:51
uint8_t * rbuf
Definition: cci.h:52
uint16_t return_len
Definition: cci.h:54
uint8_t data[TRANSFER_FW_DATA_LEN]
Definition: cci.h:163
uint8_t reserved_2[TRANSFER_FW_RESV_LEN]
Definition: cci.h:162
uint32_t offset
Definition: cci.h:161
uint8_t action
Definition: cci.h:158
uint16_t reserved_1
Definition: cci.h:160
uint8_t slot
Definition: cci.h:159
uint8_t cmd_code
Definition: cci.h:86
mctp_cci_cmd_fn fn
Definition: cci.h:87
mctp_cci_msg msg
Definition: cci.h:111
int64_t exp_to_ms
Definition: cci.h:110
mctp * mctp_inst
Definition: cci.h:109
sys_snode_t node
Definition: cci.h:108
uint8_t * pl_data
Definition: cci.h:73
mctp_ext_params ext_params
Definition: cci.h:74
mctp_cci_hdr hdr
Definition: cci.h:72
void * timeout_cb_fn_args
Definition: cci.h:79
void * recv_resp_cb_args
Definition: cci.h:76
uint16_t timeout_ms
Definition: cci.h:77