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#include "plat_i2c.h"
22#include "pldm_oem.h"
23
24/* i2c 8 bit address */
25#define I2C_ADDR_BIC 0x42
26#define I2C_ADDR_BMC 0x20
27
28/* i2c dev bus */
29#define I2C_BUS_BMC I2C_BUS6
30
31/* i3c vendor-def-id */
32#define DEFAULT_VENDOR_DEF_ID 0x567
33
34/* mctp endpoint */
35#define MCTP_EID_BMC 0x08
36
37/* I3C related defines */ //Not used in this platform
38#define I3C_BUS_BMC I2C_BUS6
39#define I3C_STATIC_ADDR_BMC 0x20
40
42 uint8_t iana[IANA_LEN];
43 uint8_t netfn_lun;
44 uint8_t ipmi_cmd;
45} __attribute__((__packed__));
46;
47
49 uint8_t completion_code;
50 uint8_t iana[IANA_LEN];
51 uint8_t netfn_lun;
52 uint8_t ipmi_cmd;
53 uint8_t ipmi_comp_code;
54} __attribute__((__packed__));
55;
56
60} __attribute__((__packed__));
61
65} __attribute__((__packed__));
66
67/* init the mctp moduel for platform */
68void plat_mctp_init(void);
69void plat_i3c_set_pid(void);
70mctp *find_mctp_by_bus(uint8_t bus);
71void plat_set_eid(uint8_t slot_eid);
72#endif /* _PLAT_MCTP_h */
void plat_mctp_init(void)
Definition: plat_mctp.c:218
mctp * find_mctp_by_bus(uint8_t bus)
Definition: plat_mctp.c:68
#define IANA_LEN
Definition: pldm_oem.h:27
void plat_i3c_set_pid(void)
Definition: plat_mctp.c:217
void plat_set_eid(uint8_t slot_eid)
Definition: plat_mctp.c:229
Definition: mctp.h:158
Definition: storage_handler.h:56
Definition: storage_handler.h:63
Definition: plat_mctp.h:23
uint8_t netfn_lun
Definition: plat_mctp.h:25
uint8_t ipmi_cmd
Definition: plat_mctp.h:26
uint8_t iana[IANA_LEN]
Definition: plat_mctp.h:24
Definition: plat_mctp.h:30
uint8_t ipmi_comp_code
Definition: plat_mctp.h:35
uint8_t ipmi_cmd
Definition: plat_mctp.h:34
uint8_t netfn_lun
Definition: plat_mctp.h:33
uint8_t completion_code
Definition: plat_mctp.h:31
uint8_t iana[IANA_LEN]
Definition: plat_mctp.h:32
Definition: plat_mctp.h:39
struct ipmi_storage_add_sel_req req_data
Definition: plat_mctp.h:41
struct mctp_to_ipmi_header_req header
Definition: plat_mctp.h:40
Definition: plat_mctp.h:44
struct mctp_to_ipmi_header_resp header
Definition: plat_mctp.h:45
struct ipmi_storage_add_sel_resp resp_data
Definition: plat_mctp.h:46
enum @190 __attribute__
uint8_t slot_eid
Definition: plat_class.c:88