OpenBIC
OpenSource Bridge-IC
mctp.c File Reference
#include "mctp.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 "plat_def.h"
Include dependency graph for mctp.c:

Functions

 LOG_MODULE_REGISTER (mctp)
 
struct __attribute__ ((packed))
 
__weak bool pal_is_need_mctp_interval (mctp *mctp_inst)
 
__weak int pal_get_mctp_interval_ms (mctp *mctp_inst)
 
__weak uint8_t plat_get_eid ()
 
mctpmctp_init (void)
 
uint8_t mctp_deinit (mctp *mctp_inst)
 
uint8_t mctp_set_medium_configure (mctp *mctp_inst, MCTP_MEDIUM_TYPE medium_type, mctp_medium_conf medium_conf)
 
uint8_t mctp_get_medium_configure (mctp *mctp_inst, MCTP_MEDIUM_TYPE *medium_type, mctp_medium_conf *medium_conf)
 
uint8_t mctp_stop (mctp *mctp_inst)
 
uint8_t mctp_start (mctp *mctp_inst)
 
uint8_t mctp_bridge_msg (mctp *mctp_inst, uint8_t *buf, uint16_t len, mctp_ext_params ext_params)
 
uint8_t mctp_send_msg (mctp *mctp_inst, uint8_t *buf, uint16_t len, mctp_ext_params ext_params)
 
uint8_t mctp_reg_endpoint_resolve_func (mctp *mctp_inst, endpoint_resolve resolve_fn)
 
uint8_t mctp_reg_msg_rx_func (mctp *mctp_inst, mctp_fn_cb rx_cb)
 
__weak uint8_t get_mctp_info (uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params)
 
bool get_mctp_info_by_eid (uint8_t port, mctp **mctp_inst, mctp_ext_params *ext_params)
 
__weak int pal_find_bus_in_mctp_port (mctp_port *p)
 
__weak uint8_t plat_get_mctp_port_count ()
 
__weak mctp_portplat_get_mctp_port (uint8_t index)
 
__weak mctppal_find_mctp_by_bus (uint8_t bus)
 
__weak mctp_portpal_find_mctp_port_by_channel_target (uint8_t target)
 

Variables

 mctp_hdr
 

Function Documentation

◆ __attribute__()

struct __attribute__ ( (packed)  )

◆ get_mctp_info()

__weak uint8_t get_mctp_info ( uint8_t  dest_endpoint,
mctp **  mctp_inst,
mctp_ext_params ext_params 
)

◆ get_mctp_info_by_eid()

bool get_mctp_info_by_eid ( uint8_t  port,
mctp **  mctp_inst,
mctp_ext_params ext_params 
)
Here is the call graph for this function:

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( mctp  )

◆ mctp_bridge_msg()

uint8_t mctp_bridge_msg ( mctp mctp_inst,
uint8_t *  buf,
uint16_t  len,
mctp_ext_params  ext_params 
)

◆ mctp_deinit()

uint8_t mctp_deinit ( mctp mctp_inst)
Here is the call graph for this function:

◆ mctp_get_medium_configure()

uint8_t mctp_get_medium_configure ( mctp mctp_inst,
MCTP_MEDIUM_TYPE medium_type,
mctp_medium_conf medium_conf 
)

◆ mctp_init()

mctp * mctp_init ( void  )
Here is the call graph for this function:

◆ mctp_reg_endpoint_resolve_func()

uint8_t mctp_reg_endpoint_resolve_func ( mctp mctp_inst,
endpoint_resolve  resolve_fn 
)

◆ mctp_reg_msg_rx_func()

uint8_t mctp_reg_msg_rx_func ( mctp mctp_inst,
mctp_fn_cb  rx_cb 
)

◆ mctp_send_msg()

uint8_t mctp_send_msg ( mctp mctp_inst,
uint8_t *  buf,
uint16_t  len,
mctp_ext_params  ext_params 
)

◆ mctp_set_medium_configure()

uint8_t mctp_set_medium_configure ( mctp mctp_inst,
MCTP_MEDIUM_TYPE  medium_type,
mctp_medium_conf  medium_conf 
)

◆ mctp_start()

uint8_t mctp_start ( mctp mctp_inst)

◆ mctp_stop()

uint8_t mctp_stop ( mctp mctp_inst)

◆ pal_find_bus_in_mctp_port()

__weak int pal_find_bus_in_mctp_port ( mctp_port p)

◆ pal_find_mctp_by_bus()

__weak mctp * pal_find_mctp_by_bus ( uint8_t  bus)
Here is the call graph for this function:

◆ pal_find_mctp_port_by_channel_target()

__weak mctp_port * pal_find_mctp_port_by_channel_target ( uint8_t  target)
Here is the call graph for this function:

◆ pal_get_mctp_interval_ms()

__weak int pal_get_mctp_interval_ms ( mctp mctp_inst)

◆ pal_is_need_mctp_interval()

__weak bool pal_is_need_mctp_interval ( mctp mctp_inst)

◆ plat_get_eid()

__weak uint8_t plat_get_eid ( )

◆ plat_get_mctp_port()

__weak mctp_port * plat_get_mctp_port ( uint8_t  index)

◆ plat_get_mctp_port_count()

__weak uint8_t plat_get_mctp_port_count ( )

Variable Documentation

◆ mctp_hdr

mctp_hdr