summaryrefslogtreecommitdiff
path: root/redfish-core/include/generated/enums/pcie_device.hpp
blob: ded55c3f10efbf8156d23a207eff159815373466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright OpenBMC Authors
#pragma once
#include <nlohmann/json.hpp>

namespace pcie_device
{
// clang-format off

enum class PCIeTypes{
    Invalid,
    Gen1,
    Gen2,
    Gen3,
    Gen4,
    Gen5,
    Gen6,
};

enum class CXLDynamicCapacityPolicies{
    Invalid,
    Free,
    Contiguous,
    Prescriptive,
    TagBased,
    EnableSharedAccess,
};

enum class DeviceType{
    Invalid,
    SingleFunction,
    MultiFunction,
    Simulated,
    Retimer,
};

enum class SlotType{
    Invalid,
    FullLength,
    HalfLength,
    LowProfile,
    Mini,
    M2,
    OEM,
    OCP3Small,
    OCP3Large,
    U2,
    EDSFF,
};

enum class LaneSplittingType{
    Invalid,
    None,
    Bridged,
    Bifurcated,
};

enum class CXLDeviceType{
    Invalid,
    Type1,
    Type2,
    Type3,
};

enum class CXLProtocolVersion{
    Invalid,
    CXL1_1,
    CXL2_0,
    CXL3_0,
    CXL3_1,
    CXL3_2,
};

NLOHMANN_JSON_SERIALIZE_ENUM(PCIeTypes, {
    {PCIeTypes::Invalid, "Invalid"},
    {PCIeTypes::Gen1, "Gen1"},
    {PCIeTypes::Gen2, "Gen2"},
    {PCIeTypes::Gen3, "Gen3"},
    {PCIeTypes::Gen4, "Gen4"},
    {PCIeTypes::Gen5, "Gen5"},
    {PCIeTypes::Gen6, "Gen6"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLDynamicCapacityPolicies, {
    {CXLDynamicCapacityPolicies::Invalid, "Invalid"},
    {CXLDynamicCapacityPolicies::Free, "Free"},
    {CXLDynamicCapacityPolicies::Contiguous, "Contiguous"},
    {CXLDynamicCapacityPolicies::Prescriptive, "Prescriptive"},
    {CXLDynamicCapacityPolicies::TagBased, "TagBased"},
    {CXLDynamicCapacityPolicies::EnableSharedAccess, "EnableSharedAccess"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(DeviceType, {
    {DeviceType::Invalid, "Invalid"},
    {DeviceType::SingleFunction, "SingleFunction"},
    {DeviceType::MultiFunction, "MultiFunction"},
    {DeviceType::Simulated, "Simulated"},
    {DeviceType::Retimer, "Retimer"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(SlotType, {
    {SlotType::Invalid, "Invalid"},
    {SlotType::FullLength, "FullLength"},
    {SlotType::HalfLength, "HalfLength"},
    {SlotType::LowProfile, "LowProfile"},
    {SlotType::Mini, "Mini"},
    {SlotType::M2, "M2"},
    {SlotType::OEM, "OEM"},
    {SlotType::OCP3Small, "OCP3Small"},
    {SlotType::OCP3Large, "OCP3Large"},
    {SlotType::U2, "U2"},
    {SlotType::EDSFF, "EDSFF"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(LaneSplittingType, {
    {LaneSplittingType::Invalid, "Invalid"},
    {LaneSplittingType::None, "None"},
    {LaneSplittingType::Bridged, "Bridged"},
    {LaneSplittingType::Bifurcated, "Bifurcated"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLDeviceType, {
    {CXLDeviceType::Invalid, "Invalid"},
    {CXLDeviceType::Type1, "Type1"},
    {CXLDeviceType::Type2, "Type2"},
    {CXLDeviceType::Type3, "Type3"},
});

NLOHMANN_JSON_SERIALIZE_ENUM(CXLProtocolVersion, {
    {CXLProtocolVersion::Invalid, "Invalid"},
    {CXLProtocolVersion::CXL1_1, "CXL1_1"},
    {CXLProtocolVersion::CXL2_0, "CXL2_0"},
    {CXLProtocolVersion::CXL3_0, "CXL3_0"},
    {CXLProtocolVersion::CXL3_1, "CXL3_1"},
    {CXLProtocolVersion::CXL3_2, "CXL3_2"},
});

// clang-format on
} // namespace pcie_device