OpenBIC
OpenSource Bridge-IC
mctp_ctrl.c File Reference
#include "mctp.h"
#include "mctp_ctrl.h"
#include <logging/log.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/printk.h>
#include <zephyr.h>
#include "libutil.h"
Include dependency graph for mctp_ctrl.c:

Classes

struct  _wait_msg
 

Macros

#define DEFAULT_WAIT_TO_MS   3000
 
#define RESP_MSG_PROC_MUTEX_WAIT_TO_MS   1000
 
#define TO_CHK_INTERVAL_MS   1000
 
#define MCTP_CTRL_INST_ID_MASK   0x3F
 

Typedefs

typedef struct _wait_msg wait_msg
 

Functions

 LOG_MODULE_DECLARE (mctp)
 
__weak int load_mctp_support_types (uint8_t *type_len, uint8_t *types)
 
__weak void plat_update_mctp_routing_table (uint8_t eid)
 
uint8_t mctp_ctrl_cmd_set_endpoint_id (void *mctp_inst, uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len, void *ext_params)
 
uint8_t mctp_ctrl_cmd_get_endpoint_id (void *mctp_inst, uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len, void *ext_params)
 
uint8_t mctp_ctrl_cmd_get_message_type_support (void *mctp_inst, uint8_t *buf, uint16_t len, uint8_t *resp, uint16_t *resp_len, void *ext_params)
 
uint8_t mctp_ctrl_cmd_handler (void *mctp_p, uint8_t *buf, uint32_t len, mctp_ext_params ext_params)
 
void mctp_ctrl_read_resp_handler (void *args, uint8_t *read_buf, uint16_t read_len)
 
void mctp_ctrl_read_timeout_handler (void *args)
 
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)
 
 K_THREAD_DEFINE (monitor_tid, 1024, mctp_ctrl_msg_timeout_monitor, NULL, NULL, NULL, 0, 0, 0)
 

Macro Definition Documentation

◆ DEFAULT_WAIT_TO_MS

#define DEFAULT_WAIT_TO_MS   3000

◆ MCTP_CTRL_INST_ID_MASK

#define MCTP_CTRL_INST_ID_MASK   0x3F

◆ RESP_MSG_PROC_MUTEX_WAIT_TO_MS

#define RESP_MSG_PROC_MUTEX_WAIT_TO_MS   1000

◆ TO_CHK_INTERVAL_MS

#define TO_CHK_INTERVAL_MS   1000

Typedef Documentation

◆ wait_msg

typedef struct _wait_msg wait_msg

Function Documentation

◆ K_THREAD_DEFINE()

K_THREAD_DEFINE ( monitor_tid  ,
1024  ,
mctp_ctrl_msg_timeout_monitor  ,
NULL  ,
NULL  ,
NULL  ,
,
,
 
)

◆ load_mctp_support_types()

__weak int load_mctp_support_types ( uint8_t *  type_len,
uint8_t *  types 
)

◆ LOG_MODULE_DECLARE()

LOG_MODULE_DECLARE ( mctp  )

◆ mctp_ctrl_cmd_get_endpoint_id()

uint8_t mctp_ctrl_cmd_get_endpoint_id ( void *  mctp_inst,
uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len,
void *  ext_params 
)
Here is the call graph for this function:

◆ mctp_ctrl_cmd_get_message_type_support()

uint8_t mctp_ctrl_cmd_get_message_type_support ( void *  mctp_inst,
uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len,
void *  ext_params 
)
Here is the call graph for this function:

◆ 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_cmd_set_endpoint_id()

uint8_t mctp_ctrl_cmd_set_endpoint_id ( void *  mctp_inst,
uint8_t *  buf,
uint16_t  len,
uint8_t *  resp,
uint16_t *  resp_len,
void *  ext_params 
)
Here is the call graph for this function:

◆ 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_read_resp_handler()

void mctp_ctrl_read_resp_handler ( void *  args,
uint8_t *  read_buf,
uint16_t  read_len 
)

◆ mctp_ctrl_read_timeout_handler()

void mctp_ctrl_read_timeout_handler ( void *  args)

◆ mctp_ctrl_send_msg()

uint8_t mctp_ctrl_send_msg ( void *  mctp_p,
mctp_ctrl_msg msg 
)

◆ plat_update_mctp_routing_table()

__weak void plat_update_mctp_routing_table ( uint8_t  eid)