summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-cp2-5422/recipes-phosphor/interfaces/bmcweb/0021-Fix-getting-properties-from-DBUS-for-CPU-and-DIMM.patch
blob: 427bdb02529b67f1a5aa8203bdff854aa4675fac (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
From f4b1247512630cc583a3861c962ff7b16c640a39 Mon Sep 17 00:00:00 2001
From: Nikita Kosenkov <NKosenkov@IBS.RU>
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<uint32_t>(&property.second);
+                if (value != nullptr)
+                {
+                    aResp->res.jsonValue["MinSpeedMHz"] = *value;
+                }
+            }
             else if (property.first == "Socket")
             {
                 const std::string* value =
-- 
2.35.1