OpenBIC
OpenSource Bridge-IC
plat_mctp.c File Reference
#include "plat_mctp.h"
#include <zephyr.h>
#include <sys/printk.h>
#include <logging/log.h>
#include <logging/log_ctrl.h>
#include <stdlib.h>
#include <stdio.h>
#include "libutil.h"
#include "mctp.h"
#include "mctp_ctrl.h"
#include "pldm.h"
#include "ipmi.h"
#include "plat_i3c.h"
#include "plat_i2c.h"
#include "hal_i3c.h"
#include "hal_i2c_target.h"
#include "plat_power_status.h"
Include dependency graph for plat_mctp.c:

Functions

 LOG_MODULE_REGISTER (plat_mctp)
 
 K_WORK_DEFINE (send_cmd_work, send_cmd_to_dev_handler)
 
void satmc_status_update ()
 
uint8_t get_mctp_info (uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params)
 
void send_cmd_to_dev_handler (struct k_work *work)
 
void send_cmd_to_dev (struct k_timer *timer)
 
bool mctp_add_sel_to_ipmi (struct ipmi_storage_add_sel_req *sel_msg, uint8_t sel_type)
 
void plat_mctp_init (void)
 
uint8_t plat_get_mctp_port_count ()
 
mctp_portplat_get_mctp_port (uint8_t index)
 

Variables

mctp_port plat_mctp_port []
 
mctp_route_entry mctp_route_tbl []
 

Function Documentation

◆ get_mctp_info()

uint8_t get_mctp_info ( uint8_t  dest_endpoint,
mctp **  mctp_inst,
mctp_ext_params ext_params 
)
Here is the call graph for this function:

◆ K_WORK_DEFINE()

K_WORK_DEFINE ( send_cmd_work  ,
send_cmd_to_dev_handler   
)

◆ LOG_MODULE_REGISTER()

LOG_MODULE_REGISTER ( plat_mctp  )

◆ mctp_add_sel_to_ipmi()

bool mctp_add_sel_to_ipmi ( struct ipmi_storage_add_sel_req sel_msg,
uint8_t  sel_type 
)
Here is the call graph for this function:

◆ plat_get_mctp_port()

mctp_port * plat_get_mctp_port ( uint8_t  index)

◆ plat_get_mctp_port_count()

uint8_t plat_get_mctp_port_count ( )

◆ plat_mctp_init()

void plat_mctp_init ( void  )

BIC will not initialize mctp instance if CXL is not present

init mctp for bmc bus

Here is the call graph for this function:

◆ satmc_status_update()

void satmc_status_update ( )
Here is the call graph for this function:

◆ send_cmd_to_dev()

void send_cmd_to_dev ( struct k_timer *  timer)

◆ send_cmd_to_dev_handler()

void send_cmd_to_dev_handler ( struct k_work *  work)

Variable Documentation

◆ mctp_route_tbl

mctp_route_entry mctp_route_tbl[]
Initial value:
= {
}
#define MCTP_EID_BMC
Definition: plat_mctp.c:58
#define MCTP_I2C_SATMC_BUS
Definition: plat_i2c.h:51
#define MCTP_I2C_SATMC_ADDR
Definition: plat_i2c.h:52
#define MCTP_I3C_BMC_ADDR
Definition: plat_i3c.h:31
#define MCTP_I3C_BMC_BUS
Definition: plat_i3c.h:30
#define MCTP_EID_SATMC
Definition: plat_mctp.h:9

◆ plat_mctp_port

mctp_port plat_mctp_port[]
Initial value:
= {
{ .channel_target = PLDM,
.conf.i3c_conf.bus = MCTP_I3C_BMC_BUS,
.conf.i3c_conf.addr = MCTP_I2C_BIC_ADDR },
{ .channel_target = SATMC_PLDM,
.medium_type = MCTP_MEDIUM_TYPE_SMBUS,
.conf.smbus_conf.bus = MCTP_I2C_SATMC_BUS,
.conf.smbus_conf.addr = MCTP_I2C_BIC_ADDR },
}
@ PLDM
Definition: ipmb.h:117
@ SATMC_PLDM
Definition: ipmb.h:120
@ MCTP_MEDIUM_TYPE_TARGET_I3C
Definition: mctp.h:82
@ MCTP_MEDIUM_TYPE_SMBUS
Definition: mctp.h:80
#define MCTP_I2C_BIC_ADDR
Definition: plat_i2c.h:49