xref: /openbmc/bmcweb/features/redfish/include/generated/enums/processor.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
30ec8b83dSEd Tanous #pragma once
40ec8b83dSEd Tanous #include <nlohmann/json.hpp>
50ec8b83dSEd Tanous 
60ec8b83dSEd Tanous namespace processor
70ec8b83dSEd Tanous {
80ec8b83dSEd Tanous // clang-format off
90ec8b83dSEd Tanous 
100ec8b83dSEd Tanous enum class ProcessorType{
110ec8b83dSEd Tanous     Invalid,
120ec8b83dSEd Tanous     CPU,
130ec8b83dSEd Tanous     GPU,
140ec8b83dSEd Tanous     FPGA,
150ec8b83dSEd Tanous     DSP,
160ec8b83dSEd Tanous     Accelerator,
170ec8b83dSEd Tanous     Core,
180ec8b83dSEd Tanous     Thread,
192ae81db9SGunnar Mills     Partition,
200ec8b83dSEd Tanous     OEM,
210ec8b83dSEd Tanous };
220ec8b83dSEd Tanous 
230ec8b83dSEd Tanous enum class ProcessorMemoryType{
240ec8b83dSEd Tanous     Invalid,
25a8d8f9d8SEd Tanous     Cache,
260ec8b83dSEd Tanous     L1Cache,
270ec8b83dSEd Tanous     L2Cache,
280ec8b83dSEd Tanous     L3Cache,
290ec8b83dSEd Tanous     L4Cache,
300ec8b83dSEd Tanous     L5Cache,
310ec8b83dSEd Tanous     L6Cache,
320ec8b83dSEd Tanous     L7Cache,
330ec8b83dSEd Tanous     HBM1,
340ec8b83dSEd Tanous     HBM2,
35a8d8f9d8SEd Tanous     HBM2E,
360ec8b83dSEd Tanous     HBM3,
370ec8b83dSEd Tanous     SGRAM,
380ec8b83dSEd Tanous     GDDR,
390ec8b83dSEd Tanous     GDDR2,
400ec8b83dSEd Tanous     GDDR3,
410ec8b83dSEd Tanous     GDDR4,
420ec8b83dSEd Tanous     GDDR5,
430ec8b83dSEd Tanous     GDDR5X,
440ec8b83dSEd Tanous     GDDR6,
450ec8b83dSEd Tanous     DDR,
460ec8b83dSEd Tanous     DDR2,
470ec8b83dSEd Tanous     DDR3,
480ec8b83dSEd Tanous     DDR4,
490ec8b83dSEd Tanous     DDR5,
500ec8b83dSEd Tanous     SDRAM,
510ec8b83dSEd Tanous     SRAM,
520ec8b83dSEd Tanous     Flash,
530ec8b83dSEd Tanous     OEM,
540ec8b83dSEd Tanous };
550ec8b83dSEd Tanous 
560ec8b83dSEd Tanous enum class FpgaType{
570ec8b83dSEd Tanous     Invalid,
580ec8b83dSEd Tanous     Integrated,
590ec8b83dSEd Tanous     Discrete,
600ec8b83dSEd Tanous };
610ec8b83dSEd Tanous 
620ec8b83dSEd Tanous enum class SystemInterfaceType{
630ec8b83dSEd Tanous     Invalid,
640ec8b83dSEd Tanous     QPI,
650ec8b83dSEd Tanous     UPI,
660ec8b83dSEd Tanous     PCIe,
670ec8b83dSEd Tanous     Ethernet,
680ec8b83dSEd Tanous     AMBA,
690ec8b83dSEd Tanous     CCIX,
700ec8b83dSEd Tanous     CXL,
710ec8b83dSEd Tanous     OEM,
720ec8b83dSEd Tanous };
730ec8b83dSEd Tanous 
740ec8b83dSEd Tanous enum class TurboState{
750ec8b83dSEd Tanous     Invalid,
760ec8b83dSEd Tanous     Enabled,
770ec8b83dSEd Tanous     Disabled,
780ec8b83dSEd Tanous };
790ec8b83dSEd Tanous 
800ec8b83dSEd Tanous enum class BaseSpeedPriorityState{
810ec8b83dSEd Tanous     Invalid,
820ec8b83dSEd Tanous     Enabled,
830ec8b83dSEd Tanous     Disabled,
840ec8b83dSEd Tanous };
850ec8b83dSEd Tanous 
860ec8b83dSEd Tanous enum class ThrottleCause{
870ec8b83dSEd Tanous     Invalid,
880ec8b83dSEd Tanous     PowerLimit,
890ec8b83dSEd Tanous     ThermalLimit,
900ec8b83dSEd Tanous     ClockLimit,
91f263e09cSEd Tanous     ManagementDetectedFault,
920ec8b83dSEd Tanous     Unknown,
930ec8b83dSEd Tanous     OEM,
940ec8b83dSEd Tanous };
950ec8b83dSEd Tanous 
960ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ProcessorType, {
970ec8b83dSEd Tanous     {ProcessorType::Invalid, "Invalid"},
980ec8b83dSEd Tanous     {ProcessorType::CPU, "CPU"},
990ec8b83dSEd Tanous     {ProcessorType::GPU, "GPU"},
1000ec8b83dSEd Tanous     {ProcessorType::FPGA, "FPGA"},
1010ec8b83dSEd Tanous     {ProcessorType::DSP, "DSP"},
1020ec8b83dSEd Tanous     {ProcessorType::Accelerator, "Accelerator"},
1030ec8b83dSEd Tanous     {ProcessorType::Core, "Core"},
1040ec8b83dSEd Tanous     {ProcessorType::Thread, "Thread"},
1052ae81db9SGunnar Mills     {ProcessorType::Partition, "Partition"},
1060ec8b83dSEd Tanous     {ProcessorType::OEM, "OEM"},
1070ec8b83dSEd Tanous });
1080ec8b83dSEd Tanous 
1090ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ProcessorMemoryType, {
1100ec8b83dSEd Tanous     {ProcessorMemoryType::Invalid, "Invalid"},
111a8d8f9d8SEd Tanous     {ProcessorMemoryType::Cache, "Cache"},
1120ec8b83dSEd Tanous     {ProcessorMemoryType::L1Cache, "L1Cache"},
1130ec8b83dSEd Tanous     {ProcessorMemoryType::L2Cache, "L2Cache"},
1140ec8b83dSEd Tanous     {ProcessorMemoryType::L3Cache, "L3Cache"},
1150ec8b83dSEd Tanous     {ProcessorMemoryType::L4Cache, "L4Cache"},
1160ec8b83dSEd Tanous     {ProcessorMemoryType::L5Cache, "L5Cache"},
1170ec8b83dSEd Tanous     {ProcessorMemoryType::L6Cache, "L6Cache"},
1180ec8b83dSEd Tanous     {ProcessorMemoryType::L7Cache, "L7Cache"},
1190ec8b83dSEd Tanous     {ProcessorMemoryType::HBM1, "HBM1"},
1200ec8b83dSEd Tanous     {ProcessorMemoryType::HBM2, "HBM2"},
121a8d8f9d8SEd Tanous     {ProcessorMemoryType::HBM2E, "HBM2E"},
1220ec8b83dSEd Tanous     {ProcessorMemoryType::HBM3, "HBM3"},
1230ec8b83dSEd Tanous     {ProcessorMemoryType::SGRAM, "SGRAM"},
1240ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR, "GDDR"},
1250ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR2, "GDDR2"},
1260ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR3, "GDDR3"},
1270ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR4, "GDDR4"},
1280ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR5, "GDDR5"},
1290ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR5X, "GDDR5X"},
1300ec8b83dSEd Tanous     {ProcessorMemoryType::GDDR6, "GDDR6"},
1310ec8b83dSEd Tanous     {ProcessorMemoryType::DDR, "DDR"},
1320ec8b83dSEd Tanous     {ProcessorMemoryType::DDR2, "DDR2"},
1330ec8b83dSEd Tanous     {ProcessorMemoryType::DDR3, "DDR3"},
1340ec8b83dSEd Tanous     {ProcessorMemoryType::DDR4, "DDR4"},
1350ec8b83dSEd Tanous     {ProcessorMemoryType::DDR5, "DDR5"},
1360ec8b83dSEd Tanous     {ProcessorMemoryType::SDRAM, "SDRAM"},
1370ec8b83dSEd Tanous     {ProcessorMemoryType::SRAM, "SRAM"},
1380ec8b83dSEd Tanous     {ProcessorMemoryType::Flash, "Flash"},
1390ec8b83dSEd Tanous     {ProcessorMemoryType::OEM, "OEM"},
1400ec8b83dSEd Tanous });
1410ec8b83dSEd Tanous 
1420ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(FpgaType, {
1430ec8b83dSEd Tanous     {FpgaType::Invalid, "Invalid"},
1440ec8b83dSEd Tanous     {FpgaType::Integrated, "Integrated"},
1450ec8b83dSEd Tanous     {FpgaType::Discrete, "Discrete"},
1460ec8b83dSEd Tanous });
1470ec8b83dSEd Tanous 
1480ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(SystemInterfaceType, {
1490ec8b83dSEd Tanous     {SystemInterfaceType::Invalid, "Invalid"},
1500ec8b83dSEd Tanous     {SystemInterfaceType::QPI, "QPI"},
1510ec8b83dSEd Tanous     {SystemInterfaceType::UPI, "UPI"},
1520ec8b83dSEd Tanous     {SystemInterfaceType::PCIe, "PCIe"},
1530ec8b83dSEd Tanous     {SystemInterfaceType::Ethernet, "Ethernet"},
1540ec8b83dSEd Tanous     {SystemInterfaceType::AMBA, "AMBA"},
1550ec8b83dSEd Tanous     {SystemInterfaceType::CCIX, "CCIX"},
1560ec8b83dSEd Tanous     {SystemInterfaceType::CXL, "CXL"},
1570ec8b83dSEd Tanous     {SystemInterfaceType::OEM, "OEM"},
1580ec8b83dSEd Tanous });
1590ec8b83dSEd Tanous 
1600ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(TurboState, {
1610ec8b83dSEd Tanous     {TurboState::Invalid, "Invalid"},
1620ec8b83dSEd Tanous     {TurboState::Enabled, "Enabled"},
1630ec8b83dSEd Tanous     {TurboState::Disabled, "Disabled"},
1640ec8b83dSEd Tanous });
1650ec8b83dSEd Tanous 
1660ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(BaseSpeedPriorityState, {
1670ec8b83dSEd Tanous     {BaseSpeedPriorityState::Invalid, "Invalid"},
1680ec8b83dSEd Tanous     {BaseSpeedPriorityState::Enabled, "Enabled"},
1690ec8b83dSEd Tanous     {BaseSpeedPriorityState::Disabled, "Disabled"},
1700ec8b83dSEd Tanous });
1710ec8b83dSEd Tanous 
1720ec8b83dSEd Tanous NLOHMANN_JSON_SERIALIZE_ENUM(ThrottleCause, {
1730ec8b83dSEd Tanous     {ThrottleCause::Invalid, "Invalid"},
1740ec8b83dSEd Tanous     {ThrottleCause::PowerLimit, "PowerLimit"},
1750ec8b83dSEd Tanous     {ThrottleCause::ThermalLimit, "ThermalLimit"},
1760ec8b83dSEd Tanous     {ThrottleCause::ClockLimit, "ClockLimit"},
177f263e09cSEd Tanous     {ThrottleCause::ManagementDetectedFault, "ManagementDetectedFault"},
1780ec8b83dSEd Tanous     {ThrottleCause::Unknown, "Unknown"},
1790ec8b83dSEd Tanous     {ThrottleCause::OEM, "OEM"},
1800ec8b83dSEd Tanous });
1810ec8b83dSEd Tanous 
1820ec8b83dSEd Tanous }
1830ec8b83dSEd Tanous // clang-format on
184