OpenBIC
OpenSource Bridge-IC
plat_mctp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef _PLAT_MCTP_h
18#define _PLAT_MCTP_h
19
20#include "storage_handler.h"
21#define MCTP_MSG_TYPE_SHIFT 0
22#define MCTP_MSG_TYPE_MASK 0x7F
23#define MCTP_IC_SHIFT 7
24#define MCTP_IC_MASK 0x80
25
26/* i2c 8 bit address */
27#define I2C_ADDR_BIC 0x20
28#define I2C_ADDR_CXL0 0x74
29#define I2C_ADDR_CXL1 0xC2
30/* i2c dev bus */
31#define I2C_BUS_CXL 0x01
32/* mctp endpoint */
33#define CXL_EID 0x2E
34
35/* init the mctp moduel for platform */
36void send_cmd_to_dev(struct k_timer *timer);
37void send_cmd_to_dev_handler(struct k_work *work);
38void plat_mctp_init(void);
39uint8_t get_mctp_route_info(uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params);
40mctp *find_mctp_by_smbus(uint8_t bus);
42uint8_t get_mctp_info(uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params);
43
44#endif /* _PLAT_MCTP_h */
uint8_t get_mctp_route_info(uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params)
Definition: plat_mctp.c:131
void plat_mctp_init(void)
Definition: plat_mctp.c:218
void send_cmd_to_dev(struct k_timer *timer)
Definition: plat_mctp.c:548
void send_cmd_to_dev_handler(struct k_work *work)
Definition: plat_mctp.c:533
Definition: mctp.h:98
Definition: mctp.h:153
mctp * get_mctp_init()
uint8_t get_mctp_info(uint8_t dest_endpoint, mctp **mctp_inst, mctp_ext_params *ext_params)
Definition: mctp.c:643
mctp * find_mctp_by_smbus(uint8_t bus)
Definition: plat_mctp.c:43