OpenBIC
OpenSource Bridge-IC
|
#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 "mctp.h"
#include "mctp_ctrl.h"
#include "pldm.h"
#include "ipmi.h"
#include "cci.h"
#include "sensor.h"
#include "plat_ipmb.h"
#include "hal_i2c.h"
Macros | |
#define | MCTP_MSG_TYPE_SHIFT 0 |
#define | MCTP_MSG_TYPE_MASK 0x7F |
#define | MCTP_IC_SHIFT 7 |
#define | MCTP_IC_MASK 0x80 |
#define | I2C_ADDR_BIC 0x40 |
#define | I2C_ADDR_BMC 0x20 |
#define | I2C_ADDR_CXL 0x64 |
#define | I3C_ADDR_SD_BIC 0x8 |
#define | I2C_BUS_BMC 0x02 |
#define | I2C_BUS_CXL 0x07 |
#define | I3C_BUS_SD_BIC 0 |
#define | MCTP_EID_BMC 0x08 |
#define | MCTP_EID_MB_BIC 0 |
#define | MCTP_EID_CXL 0 |
Functions | |
LOG_MODULE_REGISTER (plat_mctp) | |
K_TIMER_DEFINE (send_cmd_timer, send_cmd_to_dev, NULL) | |
K_WORK_DEFINE (send_cmd_work, send_cmd_to_dev_handler) | |
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 (common_addsel_msg_t *sel_msg) |
int | pal_get_medium_type (uint8_t interface) |
int | pal_get_target (uint8_t interface) |
mctp * | pal_get_mctp (uint8_t mctp_medium_type, uint8_t bus) |
void | plat_mctp_init (void) |
uint8_t | plat_get_mctp_port_count () |
mctp_port * | plat_get_mctp_port (uint8_t index) |
void | plat_update_mctp_routing_table (uint8_t eid) |
int | load_mctp_support_types (uint8_t *type_len, uint8_t *types) |
uint8_t | plat_get_eid () |
uint8_t | plat_get_cxl_eid (uint8_t cxl_id) |
Variables | |
uint8_t | plat_eid = MCTP_DEFAULT_ENDPOINT |
mctp_route_entry | plat_mctp_route_tbl [] |
uint8_t | MCTP_SUPPORTED_MESSAGES_TYPES [] |
#define I2C_ADDR_BIC 0x40 |
#define I2C_ADDR_BMC 0x20 |
#define I2C_ADDR_CXL 0x64 |
#define I2C_BUS_BMC 0x02 |
#define I2C_BUS_CXL 0x07 |
#define I3C_ADDR_SD_BIC 0x8 |
#define I3C_BUS_SD_BIC 0 |
#define MCTP_EID_BMC 0x08 |
#define MCTP_EID_CXL 0 |
#define MCTP_EID_MB_BIC 0 |
#define MCTP_IC_MASK 0x80 |
#define MCTP_IC_SHIFT 7 |
#define MCTP_MSG_TYPE_MASK 0x7F |
#define MCTP_MSG_TYPE_SHIFT 0 |
uint8_t get_mctp_info | ( | uint8_t | dest_endpoint, |
mctp ** | mctp_inst, | ||
mctp_ext_params * | ext_params | ||
) |
K_TIMER_DEFINE | ( | send_cmd_timer | , |
send_cmd_to_dev | , | ||
NULL | |||
) |
K_WORK_DEFINE | ( | send_cmd_work | , |
send_cmd_to_dev_handler | |||
) |
int load_mctp_support_types | ( | uint8_t * | type_len, |
uint8_t * | types | ||
) |
LOG_MODULE_REGISTER | ( | plat_mctp | ) |
bool mctp_add_sel_to_ipmi | ( | common_addsel_msg_t * | sel_msg | ) |
mctp * pal_get_mctp | ( | uint8_t | mctp_medium_type, |
uint8_t | bus | ||
) |
int pal_get_medium_type | ( | uint8_t | interface | ) |
int pal_get_target | ( | uint8_t | interface | ) |
uint8_t plat_get_cxl_eid | ( | uint8_t | cxl_id | ) |
uint8_t plat_get_eid | ( | ) |
mctp_port * plat_get_mctp_port | ( | uint8_t | index | ) |
uint8_t plat_get_mctp_port_count | ( | ) |
void plat_mctp_init | ( | void | ) |
BIC will not initialize mctp instance if CXL is not present
init mctp for bmc bus
void plat_update_mctp_routing_table | ( | uint8_t | eid | ) |
void send_cmd_to_dev | ( | struct k_timer * | timer | ) |
void send_cmd_to_dev_handler | ( | struct k_work * | work | ) |
uint8_t MCTP_SUPPORTED_MESSAGES_TYPES[] |
uint8_t plat_eid = MCTP_DEFAULT_ENDPOINT |
mctp_route_entry plat_mctp_route_tbl[] |