OpenBIC
OpenSource Bridge-IC
mctp_ctrl.h File Reference
#include "mctp.h"
#include <stdint.h>
#include <zephyr.h>
Include dependency graph for mctp_ctrl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _mctp_ctrl_cmd_handler
 
struct  _set_eid_req
 
struct  _set_eid_resp
 
struct  _get_message_type_resp
 
struct  _get_eid_resp
 
struct  mctp_ctrl_msg
 
struct  _mctp_ctrl_resp_arg
 

Macros

#define MCTP_BASE_LINE_UNIT   64
 
#define MCTP_CTRL_CMD_SET_ENDPOINT_ID   0x01
 
#define MCTP_CTRL_CMD_GET_ENDPOINT_ID   0x02
 
#define MCTP_CTRL_CMD_GET_MESSAGE_TYPE_SUPPORT   0x05
 
#define MCTP_CTRL_CMD_GET_ENDPOINT_ID_REQ_LEN   0x00
 
#define MCTP_CTRL_READ_STATUS_SUCCESS   0x00
 
#define MCTP_CTRL_READ_STATUS_CC_ERROR   0x01
 
#define MCTP_CTRL_READ_STATUS_TIMEOUT   0x02
 
#define MCTP_CTRL_CC_SUCCESS   0x00
 
#define MCTP_CTRL_CC_ERROR   0x01
 
#define MCTP_CTRL_CC_ERROR_INVALID_DATA   0x02
 
#define MCTP_CTRL_CC_ERROR_INVALID_LENGTH   0x03
 
#define MCTP_CTRL_CC_ERROR_NOT_READY   0x04
 
#define MCTP_CTRL_CC_ERROR_UNSUPPORTED_CMD   0x05
 
#define SET_EID_REQ_OP_SET_EID   0x00
 
#define SET_EID_REQ_OP_FORCE_EID   0x01
 

Typedefs

typedef uint8_t(* mctp_ctrl_cmd_fn) (void *, uint8_t *, uint16_t, uint8_t *, uint16_t *, void *)
 
typedef struct _mctp_ctrl_cmd_handler mctp_ctrl_cmd_handler_t
 
typedef struct _mctp_ctrl_resp_arg mctp_ctrl_resp_arg
 

Enumerations

enum  endpoint_type { SIMPLE_ENDPOINT , BRIDGE }
 
enum  eid_type { DYNAMIC_EID , STATIC_EID }
 
enum  message_type { TYPE_MCTP_CONTROL , TYPE_PLDM , TYPE_MAX_SIZE }
 

Functions

struct _set_eid_req __attribute__ ((packed))
 
uint8_t mctp_ctrl_cmd_handler (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params)
 
uint8_t mctp_ctrl_send_msg (void *mctp_p, mctp_ctrl_msg *msg)
 
uint8_t mctp_ctrl_read (void *mctp_p, mctp_ctrl_msg *msg, uint8_t *read_buf, uint16_t read_len)
 
void plat_update_mctp_routing_table (uint8_t eid)
 

Variables

typedef __attribute__
 
uint8_t op
 
uint8_t eid
 
uint8_t completion_code
 
uint8_t status
 
uint8_t eid_pool_size
 
uint8_t type_count
 
uint8_t type_number [0]
 
uint8_t eid_type
 
uint8_t __pad0__
 
uint8_t endpoint_type
 
uint8_t __pad1__
 
uint8_t medium_specific_info
 
 mctp_ctrl_hdr
 

Macro Definition Documentation

◆ MCTP_BASE_LINE_UNIT

#define MCTP_BASE_LINE_UNIT   64

◆ MCTP_CTRL_CC_ERROR

#define MCTP_CTRL_CC_ERROR   0x01

◆ MCTP_CTRL_CC_ERROR_INVALID_DATA

#define MCTP_CTRL_CC_ERROR_INVALID_DATA   0x02

◆ MCTP_CTRL_CC_ERROR_INVALID_LENGTH

#define MCTP_CTRL_CC_ERROR_INVALID_LENGTH   0x03

◆ MCTP_CTRL_CC_ERROR_NOT_READY

#define MCTP_CTRL_CC_ERROR_NOT_READY   0x04

◆ MCTP_CTRL_CC_ERROR_UNSUPPORTED_CMD

#define MCTP_CTRL_CC_ERROR_UNSUPPORTED_CMD   0x05

◆ MCTP_CTRL_CC_SUCCESS

#define MCTP_CTRL_CC_SUCCESS   0x00

◆ MCTP_CTRL_CMD_GET_ENDPOINT_ID

#define MCTP_CTRL_CMD_GET_ENDPOINT_ID   0x02

◆ MCTP_CTRL_CMD_GET_ENDPOINT_ID_REQ_LEN

#define MCTP_CTRL_CMD_GET_ENDPOINT_ID_REQ_LEN   0x00

◆ MCTP_CTRL_CMD_GET_MESSAGE_TYPE_SUPPORT

#define MCTP_CTRL_CMD_GET_MESSAGE_TYPE_SUPPORT   0x05

◆ MCTP_CTRL_CMD_SET_ENDPOINT_ID

#define MCTP_CTRL_CMD_SET_ENDPOINT_ID   0x01

◆ MCTP_CTRL_READ_STATUS_CC_ERROR

#define MCTP_CTRL_READ_STATUS_CC_ERROR   0x01

◆ MCTP_CTRL_READ_STATUS_SUCCESS

#define MCTP_CTRL_READ_STATUS_SUCCESS   0x00

◆ MCTP_CTRL_READ_STATUS_TIMEOUT

#define MCTP_CTRL_READ_STATUS_TIMEOUT   0x02

◆ SET_EID_REQ_OP_FORCE_EID

#define SET_EID_REQ_OP_FORCE_EID   0x01

◆ SET_EID_REQ_OP_SET_EID

#define SET_EID_REQ_OP_SET_EID   0x00

Typedef Documentation

◆ mctp_ctrl_cmd_fn

typedef uint8_t(* mctp_ctrl_cmd_fn) (void *, uint8_t *, uint16_t, uint8_t *, uint16_t *, void *)

◆ mctp_ctrl_cmd_handler_t

◆ mctp_ctrl_resp_arg

Enumeration Type Documentation

◆ eid_type

enum eid_type
Enumerator
DYNAMIC_EID 
STATIC_EID 

◆ endpoint_type

Enumerator
SIMPLE_ENDPOINT 
BRIDGE 

◆ message_type

Enumerator
TYPE_MCTP_CONTROL 
TYPE_PLDM 
TYPE_MAX_SIZE 

Function Documentation

◆ __attribute__()

struct _set_eid_req __attribute__ ( (packed)  )

◆ mctp_ctrl_cmd_handler()

uint8_t mctp_ctrl_cmd_handler ( void *  mctp_p,
uint8_t *  buf,
uint32_t  len,
mctp_ext_params  ext_params 
)

◆ mctp_ctrl_read()

uint8_t mctp_ctrl_read ( void *  mctp_p,
mctp_ctrl_msg msg,
uint8_t *  read_buf,
uint16_t  read_len 
)
Here is the call graph for this function:

◆ mctp_ctrl_send_msg()

uint8_t mctp_ctrl_send_msg ( void *  mctp_p,
mctp_ctrl_msg msg 
)

◆ plat_update_mctp_routing_table()

void plat_update_mctp_routing_table ( uint8_t  eid)

Variable Documentation

◆ __attribute__

◆ __pad0__

uint16_t __pad0__

◆ __pad1__

uint16_t __pad1__

◆ completion_code

uint8_t completion_code

◆ eid

uint8_t eid

◆ eid_pool_size

uint8_t eid_pool_size

◆ eid_type

uint8_t eid_type

◆ endpoint_type

uint8_t endpoint_type

◆ mctp_ctrl_hdr

mctp_ctrl_hdr

◆ medium_specific_info

uint8_t medium_specific_info

◆ op

uint8_t op

◆ status

uint8_t status

◆ type_count

uint8_t type_count

◆ type_number

uint8_t type_number[0]