From 1bffd284be6616b1439ca6e1a189b7eab6abec76 Mon Sep 17 00:00:00 2001 From: Nikita Kosenkov Date: Wed, 12 Oct 2022 16:06:01 +0300 Subject: SILABMC-337: Fix getting properties from DBUS for CPU and DIMM --- ...ing-properties-from-DBUS-for-CPU-and-DIMM.patch | 58 ++++++++++++++++++++++ .../recipes-phosphor/interfaces/bmcweb_%.bbappend | 9 ++-- 2 files changed, 63 insertions(+), 4 deletions(-) create mode 100644 meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch diff --git a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch new file mode 100644 index 0000000000..427bdb0252 --- /dev/null +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch @@ -0,0 +1,58 @@ +From f4b1247512630cc583a3861c962ff7b16c640a39 Mon Sep 17 00:00:00 2001 +From: Nikita Kosenkov +Date: Wed, 12 Oct 2022 15:32:19 +0300 +Subject: [PATCH] Fix getting properties from DBUS for CPU and DIMM + +--- + redfish-core/lib/memory.hpp | 8 +++++--- + redfish-core/lib/processor.hpp | 8 ++++++++ + 2 files changed, 13 insertions(+), 3 deletions(-) + +diff --git a/redfish-core/lib/memory.hpp b/redfish-core/lib/memory.hpp +index dcd017dc..8751a9b5 100644 +--- a/redfish-core/lib/memory.hpp ++++ b/redfish-core/lib/memory.hpp +@@ -418,9 +418,10 @@ inline void + const bool success = sdbusplus::unpackPropertiesNoThrow( + dbus_utils::UnpackErrorPrinter(), properties, "MemoryDataWidth", + memoryDataWidth, "MemorySizeInKB", memorySizeInKB, "PartNumber", +- partNumber, "SerialNumber", serialNumber, "Present", present, +- "MemoryTotalWidth", memoryTotalWidth, "ECC", ecc, "FormFactor", +- formFactor, "AllowedSpeedsMT", allowedSpeedsMT, "MemoryAttributes", ++ partNumber, "SerialNumber", serialNumber, "Manufacturer", manufacturer, ++ "RevisionCode", revisionCode, "Present", present, "MemoryTotalWidth", ++ memoryTotalWidth, "ECC", ecc, "FormFactor", formFactor, ++ "AllowedSpeedsMT", allowedSpeedsMT, "MemoryAttributes", + memoryAttributes, "MemoryConfiguredSpeedInMhz", + memoryConfiguredSpeedInMhz, "MemoryType", memoryType, "Channel", + channel, "MemoryController", memoryController, "Slot", slot, "Socket", +@@ -440,6 +441,7 @@ inline void + + if (memorySizeInKB != nullptr) + { ++ aResp->res.jsonValue[jsonPtr]["MemorySize"] = (*memorySizeInKB); + aResp->res.jsonValue[jsonPtr]["CapacityMiB"] = (*memorySizeInKB >> 10); + } + +diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp +index ea09231f..d7b26a80 100644 +--- a/redfish-core/lib/processor.hpp ++++ b/redfish-core/lib/processor.hpp +@@ -129,6 +129,14 @@ inline void getCpuDataByInterface( + aResp->res.jsonValue["MaxSpeedMHz"] = *value; + } + } ++ else if (property.first == "MinSpeedMHz") ++ { ++ const uint32_t* value = std::get_if(&property.second); ++ if (value != nullptr) ++ { ++ aResp->res.jsonValue["MinSpeedMHz"] = *value; ++ } ++ } + else if (property.first == "Socket") + { + const std::string* value = +-- +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 a3007de5e5..466abc6d99 100644 --- a/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb_%.bbappend @@ -13,10 +13,11 @@ SRC_URI += "\ file://0014-Additional-details-about-errors-when-change-user-pw.patch \ file://0015-Redfish-Implement-SNMP-Trap.patch \ file://0016-Redfish-implement-Syslog-config.patch \ - file://0017-update-smtp.patch \ - file://0018-add-timezone.patch \ - file://0019-add-smtp-logging.patch \ - file://0020-set-smtp-send-post-request.patch \ + file://0017-update-smtp.patch \ + file://0018-add-timezone.patch \ + file://0019-add-smtp-logging.patch \ + file://0020-set-smtp-send-post-request.patch \ + file://0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch \ " #SRC_URI += "\ -- cgit v1.2.3