summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch')
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch136
1 files changed, 0 insertions, 136 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch
deleted file mode 100644
index f7f5145b0c..0000000000
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-From ed5862ee20506cba2c6354a1e8260ef1dc1726ea Mon Sep 17 00:00:00 2001
-From: eportnov <eportnov@ibs.ru>
-Date: Fri, 8 Jul 2022 10:31:14 +0300
-Subject: [PATCH] add new cpu fields
-
----
- redfish-core/lib/processor.hpp | 106 +++++++++++++++++++++++++++++++++
- 1 file changed, 106 insertions(+)
-
-diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
-index a7f8a413f..d97d314fd 100644
---- a/redfish-core/lib/processor.hpp
-+++ b/redfish-core/lib/processor.hpp
-@@ -66,6 +66,77 @@ inline void getProcessorUUID(std::shared_ptr<bmcweb::AsyncResp> aResp,
- });
- }
-
-+inline std::string translateInstructionSetTypeToRedfish(const std::string& instructionSetType)
-+{
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.ARM_A32")
-+ {
-+ return "ARM-A32";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.ARM_A64")
-+ {
-+ return "ARM-A64";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.IA_64")
-+ {
-+ return "IA-64";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.MIPS32")
-+ {
-+ return "MIPS32";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.MIPS64")
-+ {
-+ return "MIPS64";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.OEM")
-+ {
-+ return "OEM";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.PowerISA")
-+ {
-+ return "PowerISA";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.x86")
-+ {
-+ return "x86";
-+ }
-+ if (instructionSetType == "xyz.openbmc_project.Inventory.Item.Cpu.Instruction.x86_64")
-+ {
-+ return "x86-64";
-+ }
-+ return "";
-+}
-+
-+inline std::string translateProcessorArchTypeToRedfish(const std::string& processorArchType)
-+{
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.ARM")
-+ {
-+ return "ARM";
-+ }
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.IA_64")
-+ {
-+ return "IA-64";
-+ }
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.MIPS")
-+ {
-+ return "MIPS";
-+ }
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.OEM")
-+ {
-+ return "OEM";
-+ }
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.Power")
-+ {
-+ return "Power";
-+ }
-+ if (processorArchType == "xyz.openbmc_project.Inventory.Item.Cpu.ProcessorArchitecture.x86")
-+ {
-+ return "x86";
-+ }
-+ return "";
-+}
-+
-+
- inline void getCpuDataByInterface(
- const std::shared_ptr<bmcweb::AsyncResp>& aResp,
- const dbus::utility::DBusInteracesMap& cpuInterfacesProperties)
-@@ -144,6 +215,41 @@ inline void getCpuDataByInterface(
- aResp->res.jsonValue["TotalThreads"] = *value;
- }
- }
-+ else if (property.first == "InstructionSet")
-+ {
-+ const std::string* value =
-+ std::get_if<std::string>(&property.second);
-+ if (value != nullptr)
-+ {
-+ aResp->res.jsonValue["InstructionSet"] = translateInstructionSetTypeToRedfish(*value);
-+ }
-+ }
-+ else if (property.first == "Version")
-+ {
-+ const std::string* value =
-+ std::get_if<std::string>(&property.second);
-+ if (value != nullptr)
-+ {
-+ aResp->res.jsonValue["Version"] = *value;
-+ }
-+ }
-+ else if (property.first == "ProcessorArchitecture")
-+ {
-+ const std::string* value =
-+ std::get_if<std::string>(&property.second);
-+ if (value != nullptr)
-+ {
-+ aResp->res.jsonValue["ProcessorArchitecture"] = translateProcessorArchTypeToRedfish(*value);
-+ }
-+ }
-+ else if (property.first == "MinSpeedMHz")
-+ {
-+ const uint32_t* value = std::get_if<uint32_t>(&property.second);
-+ if (value != nullptr)
-+ {
-+ aResp->res.jsonValue["MinSpeedMHz"] = *value;
-+ }
-+ }
- else if (property.first == "EffectiveFamily")
- {
- const uint16_t* value = std::get_if<uint16_t>(&property.second);
---
-2.35.1
-