summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces
diff options
context:
space:
mode:
authorNikita Kosenkov <NKosenkov@IBS.RU>2022-07-25 10:47:10 +0300
committerNikita Kosenkov <NKosenkov@IBS.RU>2022-07-25 10:47:10 +0300
commit1e61e370dbdbf68c0f58d6fbe0f4485b960a1f74 (patch)
treee0d08972b04efff054eaebf4801c8e8b677a28bd /meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces
parentd6a6955708973e3d15acee4b5535b6a47a978b80 (diff)
downloadopenbmc-1e61e370dbdbf68c0f58d6fbe0f4485b960a1f74.tar.xz
bmcweb: change SRCREV
Diffstat (limited to 'meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces')
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0001-IBS-Default-BMC-Name-and-Model.patch38
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch136
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch69
-rw-r--r--meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend2
4 files changed, 226 insertions, 19 deletions
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0001-IBS-Default-BMC-Name-and-Model.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0001-IBS-Default-BMC-Name-and-Model.patch
index 06342a344e..105c3a1e01 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0001-IBS-Default-BMC-Name-and-Model.patch
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0001-IBS-Default-BMC-Name-and-Model.patch
@@ -1,4 +1,4 @@
-From aedf441cea55a3cb5e8c8a815c8cbe1c7944f863 Mon Sep 17 00:00:00 2001
+From cfef198e816222d960cc003e3717bb9d79a89d60 Mon Sep 17 00:00:00 2001
From: "Andrey V.Kosteltsev" <AKosteltsev@IBS.RU>
Date: Tue, 12 Jul 2022 12:09:23 +0300
Subject: [PATCH] IBS: Default BMC Name and Model
@@ -8,27 +8,27 @@ Subject: [PATCH] IBS: Default BMC Name and Model
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
-index aa4c694da..86b8c7df9 100644
+index d1e43fb44..446a53dfc 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
-@@ -1974,7 +1974,7 @@ inline void requestRoutesManager(App& app)
- asyncResp->res.jsonValue["@odata.type"] =
- "#Manager.v1_11_0.Manager";
- asyncResp->res.jsonValue["Id"] = "bmc";
-- asyncResp->res.jsonValue["Name"] = "OpenBmc Manager";
-+ asyncResp->res.jsonValue["Name"] = "Sila Bmc Manager";
- asyncResp->res.jsonValue["Description"] =
- "Baseboard Management Controller";
- asyncResp->res.jsonValue["PowerState"] = "On";
-@@ -1984,7 +1984,7 @@ inline void requestRoutesManager(App& app)
- asyncResp->res.jsonValue["UUID"] = systemd_utils::getUuid();
- asyncResp->res.jsonValue["ServiceEntryPointUUID"] = uuid;
- asyncResp->res.jsonValue["Model"] =
-- "OpenBmc"; // TODO(ed), get model
-+ "Sila Bmc"; // TODO(ed), get model
+@@ -1959,7 +1959,7 @@ inline void requestRoutesManager(App& app)
+ asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Managers/bmc";
+ asyncResp->res.jsonValue["@odata.type"] = "#Manager.v1_14_0.Manager";
+ asyncResp->res.jsonValue["Id"] = "bmc";
+- asyncResp->res.jsonValue["Name"] = "OpenBmc Manager";
++ asyncResp->res.jsonValue["Name"] = "Sila Bmc Manager";
+ asyncResp->res.jsonValue["Description"] =
+ "Baseboard Management Controller";
+ asyncResp->res.jsonValue["PowerState"] = "On";
+@@ -1969,7 +1969,7 @@ inline void requestRoutesManager(App& app)
+ asyncResp->res.jsonValue["ManagerType"] = "BMC";
+ asyncResp->res.jsonValue["UUID"] = systemd_utils::getUuid();
+ asyncResp->res.jsonValue["ServiceEntryPointUUID"] = uuid;
+- asyncResp->res.jsonValue["Model"] = "OpenBmc"; // TODO(ed), get model
++ asyncResp->res.jsonValue["Model"] = "Sila Bmc"; // TODO(ed), get model
- asyncResp->res.jsonValue["LogServices"] = {
- {"@odata.id", "/redfish/v1/Managers/bmc/LogServices"}};
+ asyncResp->res.jsonValue["LogServices"]["@odata.id"] =
+ "/redfish/v1/Managers/bmc/LogServices";
--
2.35.1
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
new file mode 100644
index 0000000000..f7f5145b0c
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0002-add-new-cpu-fields.patch
@@ -0,0 +1,136 @@
+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
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch
new file mode 100644
index 0000000000..13b880457e
--- /dev/null
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0003-add-new-dimm-fields.patch
@@ -0,0 +1,69 @@
+From 824ef06312f5457fa6ab7d8ef08d160f3dc888a9 Mon Sep 17 00:00:00 2001
+From: eportnov <eportnov@ibs.ru>
+Date: Fri, 8 Jul 2022 16:30:51 +0300
+Subject: [PATCH] add new dimm fields
+
+---
+ redfish-core/lib/memory.hpp | 25 ++++++++++++++++++++++++-
+ 1 file changed, 24 insertions(+), 1 deletion(-)
+
+diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp
+index 3c10130e5..be3af6fb3 100644
+--- a/redfish-core/lib/memory.hpp
++++ b/redfish-core/lib/memory.hpp
+@@ -31,6 +31,10 @@ namespace redfish
+
+ inline std::string translateMemoryTypeToRedfish(const std::string& memoryType)
+ {
++ if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DRAM")
++ {
++ return "DRAM";
++ }
+ if (memoryType == "xyz.openbmc_project.Inventory.Item.Dimm.DeviceType.DDR")
+ {
+ return "DDR";
+@@ -470,6 +474,7 @@ inline void
+ messages::internalError(aResp->res);
+ return;
+ }
++ aResp->res.jsonValue["MemorySize"] = (*memorySize);
+ aResp->res.jsonValue[jsonPtr]["CapacityMiB"] = (*memorySize >> 10);
+ }
+ else if (property.first == "PartNumber")
+@@ -634,7 +639,7 @@ inline void
+ // so just leave off
+ if (!memoryDeviceType.empty())
+ {
+- aResp->res.jsonValue[jsonPtr]["MemoryDeviceType"] =
++ aResp->res.jsonValue[jsonPtr]["MemoryType"] =
+ memoryDeviceType;
+ }
+ if (value->find("DDR") != std::string::npos)
+@@ -647,6 +652,24 @@ inline void
+ }
+ }
+ }
++ else if (property.first == "Model")
++ {
++ const auto* value =
++ std::get_if<std::string>(&property.second);
++ if (value != nullptr)
++ {
++ aResp->res.jsonValue["Model"] = *value;
++ }
++ }
++ else if (property.first == "Description")
++ {
++ const auto* value =
++ std::get_if<std::string>(&property.second);
++ if (value != nullptr)
++ {
++ aResp->res.jsonValue["Description"] = *value;
++ }
++ }
+ // memory location interface
+ else if (property.first == "Channel" ||
+ property.first == "MemoryController" ||
+--
+2.35.1
+
diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
index c4c7943d51..c790f1cb60 100644
--- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
+++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -2,6 +2,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
SRC_URI += "\
file://0001-IBS-Default-BMC-Name-and-Model.patch \
+ file://0002-add-new-cpu-fields.patch \
+ file://0003-add-new-dimm-fields.patch \
"
EXTRA_OEMESON += "\