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/*
18 * Copyright (c) 2012-2014 Wind River Systems, Inc.
19 *
20 * SPDX-License-Identifier: Apache-2.0
21 */
22
23#ifndef _PLAT_MCTP_H
24#define _PLAT_MCTP_H
25
26#include "ipmi.h"
27#include "mctp.h"
28#include "plat_i2c.h"
29
30#define I2C_BUS_BMC I2C_BUS9
31#define I3C_BUS_BMC I3C_BUS1
32#define I2C_ADDR_BIC 0x40
33#define I2C_ADDR_BMC 0x20
34
35/* mctp endpoint */
36#define MCTP_EID_BMC 0x08
37
38#define MCTP_RESP_DATA_INDEX 4
39/* MCTP CC, Netfn, cmd, IPMI CC */
40#define MCTP_RESP_HEADER_COUNT 4
41
42void plat_mctp_init(void);
43int pal_pldm_send_ipmi_request(ipmi_msg *msg, uint8_t eid);
44uint8_t get_mctp_route_info(uint8_t dest_endpoint, void **mctp_inst, mctp_ext_params *ext_params);
45
46#endif
int pal_pldm_send_ipmi_request(ipmi_msg *msg, uint8_t eid)
Definition: plat_mctp.c:157
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
uint8_t eid
Definition: mctp_ctrl.h:1
Definition: mctp.h:98
Definition: ipmb.h:165