OpenBIC
OpenSource Bridge-IC
plat_pldm.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_PLDM_h
18#define _PLAT_PLDM_h
19
20#include "mctp.h"
21
22typedef struct _bridge_store {
26
28 uint8_t iana[3];
29 union {
30 struct {
31 uint8_t inst_id : 5;
32 uint8_t rsvd : 1;
33 uint8_t d : 1;
34 uint8_t rq : 1;
35 };
36 uint8_t req_d_id;
37 };
38
39 uint8_t pldm_type : 6;
40 uint8_t ver : 2;
41 uint8_t cmd;
42 uint8_t payload[1];
43} __attribute__((packed));
44
45bool pldm_request_msg_need_bypass(uint8_t *buf, uint32_t len);
46bool pldm_save_mctp_inst_from_ipmb_req(void *mctp_inst, uint8_t inst_num,
47 mctp_ext_params ext_params);
50
51#endif /* _PLAT_PLDM_h */
Definition: plat_pldm.h:22
mctp * mctp_inst
Definition: plat_pldm.h:23
mctp_ext_params ext_params
Definition: plat_pldm.h:24
Definition: mctp.h:98
Definition: mctp.h:153
Definition: plat_pldm.h:27
uint8_t ver
Definition: plat_pldm.h:40
uint8_t pldm_type
Definition: plat_pldm.h:39
uint8_t rsvd
Definition: plat_pldm.h:32
uint8_t cmd
Definition: plat_pldm.h:41
uint8_t req_d_id
Definition: plat_pldm.h:36
uint8_t rq
Definition: plat_pldm.h:34
uint8_t d
Definition: plat_pldm.h:33
uint8_t iana[3]
Definition: plat_pldm.h:28
uint8_t inst_id
Definition: plat_pldm.h:31
uint8_t payload[1]
Definition: plat_pldm.h:42
Definition: ipmb.h:165
bool pldm_save_mctp_inst_from_ipmb_req(void *mctp_inst, uint8_t inst_num, mctp_ext_params ext_params)
Definition: plat_pldm.c:199
bool pldm_request_msg_need_bypass(uint8_t *buf, uint32_t len)
Definition: plat_pldm.c:67
struct bypass_pldm_cmd_req_rsp __attribute__((packed))
Definition: cci.h:57
bool pldm_send_ipmb_rsp(ipmi_msg *msg)
Definition: plat_pldm.c:228
bridge_store * pldm_find_mctp_inst_by_inst_id(uint8_t inst_num)
Definition: plat_pldm.c:216
struct _bridge_store bridge_store