OpenBIC
OpenSource Bridge-IC
|
#include <zephyr.h>
#include <sys/printk.h>
#include <logging/log.h>
#include <logging/log_ctrl.h>
#include <stdlib.h>
#include "mctp.h"
#include "mctp_ctrl.h"
#include "pldm.h"
#include "ncsi.h"
#include "ipmi.h"
#include "sensor.h"
#include "plat_hook.h"
#include "plat_mctp.h"
#include "plat_gpio.h"
#include "plat_ncsi.h"
#include "plat_fru.h"
Macros | |
#define | I2C_ADDR_BIC 0x40 |
#define | I2C_ADDR_BMC 0x20 |
#define | I2C_ADDR_NIC 0x64 |
#define | I2C_BUS_BMC 0x06 |
#define | I2C_BUS_NIC_0 0x00 |
#define | I2C_BUS_NIC_1 0x01 |
#define | I2C_BUS_NIC_2 0x02 |
#define | I2C_BUS_NIC_3 0x03 |
#define | I2C_BUS_NIC_4 0x0A |
#define | I2C_BUS_NIC_5 0x0B |
#define | I2C_BUS_NIC_6 0x0C |
#define | I2C_BUS_NIC_7 0x0D |
#define | MCTP_EID_BMC 0x08 |
#define | MCTP_EID_NIC_0 0x10 |
#define | MCTP_EID_NIC_1 0x11 |
#define | MCTP_EID_NIC_2 0x12 |
#define | MCTP_EID_NIC_3 0x13 |
#define | MCTP_EID_NIC_4 0x14 |
#define | MCTP_EID_NIC_5 0x15 |
#define | MCTP_EID_NIC_6 0x16 |
#define | MCTP_EID_NIC_7 0x17 |
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) |
bool | mctp_add_sel_to_ipmi (common_addsel_msg_t *sel_msg) |
uint8_t | mellanox_cx7_ncsi_get_link_type (void) |
bool | is_broadcom_thor2_nic_type () |
void | check_nic_config_by_ncsi (void) |
uint8_t | get_nic_config (void) |
void | send_cmd_to_dev_handler (struct k_work *work) |
void | send_cmd_to_dev (struct k_timer *timer) |
void | plat_mctp_init (void) |
Variables | |
mctp_route_entry | mctp_route_tbl [] |
struct pldm_variable_field | nic_vesion [8] |
#define I2C_ADDR_BIC 0x40 |
#define I2C_ADDR_BMC 0x20 |
#define I2C_ADDR_NIC 0x64 |
#define I2C_BUS_BMC 0x06 |
#define I2C_BUS_NIC_0 0x00 |
#define I2C_BUS_NIC_1 0x01 |
#define I2C_BUS_NIC_2 0x02 |
#define I2C_BUS_NIC_3 0x03 |
#define I2C_BUS_NIC_4 0x0A |
#define I2C_BUS_NIC_5 0x0B |
#define I2C_BUS_NIC_6 0x0C |
#define I2C_BUS_NIC_7 0x0D |
#define MCTP_EID_BMC 0x08 |
#define MCTP_EID_NIC_0 0x10 |
#define MCTP_EID_NIC_1 0x11 |
#define MCTP_EID_NIC_2 0x12 |
#define MCTP_EID_NIC_3 0x13 |
#define MCTP_EID_NIC_4 0x14 |
#define MCTP_EID_NIC_5 0x15 |
#define MCTP_EID_NIC_6 0x16 |
#define MCTP_EID_NIC_7 0x17 |
void check_nic_config_by_ncsi | ( | void | ) |
uint8_t get_mctp_info | ( | uint8_t | dest_endpoint, |
mctp ** | mctp_inst, | ||
mctp_ext_params * | ext_params | ||
) |
uint8_t get_nic_config | ( | void | ) |
bool is_broadcom_thor2_nic_type | ( | ) |
K_TIMER_DEFINE | ( | send_cmd_timer | , |
send_cmd_to_dev | , | ||
NULL | |||
) |
K_WORK_DEFINE | ( | send_cmd_work | , |
send_cmd_to_dev_handler | |||
) |
LOG_MODULE_REGISTER | ( | plat_mctp | ) |
bool mctp_add_sel_to_ipmi | ( | common_addsel_msg_t * | sel_msg | ) |
uint8_t mellanox_cx7_ncsi_get_link_type | ( | void | ) |
void plat_mctp_init | ( | void | ) |
BIC will not initialize mctp instance if CXL is not present
init mctp for bmc bus
void send_cmd_to_dev | ( | struct k_timer * | timer | ) |
void send_cmd_to_dev_handler | ( | struct k_work * | work | ) |
mctp_route_entry mctp_route_tbl[] |
struct pldm_variable_field nic_vesion[8] |