openUBMC Chip Abstract Layer V0.1
载入中...
搜索中...
未找到
mctp.h
1/*
2 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
3 *
4 * this file licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 * http://license.coscl.org.cn/MulanPSL2
8 *
9 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
11 * PURPOSE.
12 * See the Mulan PSL v2 for more details.
13 *
14 * Create: 2025-10-16
15 */
16
17#ifndef MCTP_H
18#define MCTP_H
19#include "driver.h"
20
21namespace DRIVER_PCIEVDM {
22
28 uint8_t routing : 3;
29 uint8_t type : 2;
30 uint8_t fmt : 2;
31 uint8_t res1 : 1;
32
33 uint8_t res3 : 4;
34 uint8_t tc : 3;
35 uint8_t res2 : 1;
36
37 uint8_t len_h : 2;
38 uint8_t res4 : 2;
39 uint8_t attr : 2;
40 uint8_t ep : 1;
41 uint8_t td : 1;
42
43 uint8_t len_l;
44
45 uint8_t req_id;
46
47 uint8_t vdm_code : 4;
48 uint8_t pad : 2;
49 uint8_t res5 : 2;
50
51 uint8_t msgcode;
52
53 uint8_t target_id;
54
55 uint8_t vendor_id;
56};
57
58
59class PcieVdm : public IDriver {
60public:
68 virtual int32_t write(int32_t index, const std::string_view_t &data);
69
76 virtual string_t read(int32_t index, size_t len);
77
83 virtual void reset(int32_t index);
84};
85} // namespace bcal
86
87#endif
Definition mctp.h:59
virtual int32_t write(int32_t index, const std::string_view_t &data)
发送MCTP over PCIe VDM消息
virtual string_t read(int32_t index, size_t len)
读取MCTP over PCIe VDM消息
virtual void reset(int32_t index)
复位PCIe VDM控制器
BCAL 驱动公共接口定义
MCTP PCIe VDM 消息结构体,参见DMTF相关规范DSP0238
Definition mctp.h:27