summaryrefslogtreecommitdiff
path: root/redfish-core/lib/processor.hpp
diff options
context:
space:
mode:
authorJonathan Doman <jonathan.doman@intel.com>2020-10-27 09:10:24 +0300
committerJonathan Doman <jonathan.doman@intel.com>2020-10-28 21:01:32 +0300
commitdc3fa6671cd588d5a09416da09030f82aff2e50b (patch)
tree63e2049183903edcf3a0d50492c833aa781b86fd /redfish-core/lib/processor.hpp
parent52599638f4e39c0565e8a9823514837934ae9f59 (diff)
downloadbmcweb-dc3fa6671cd588d5a09416da09030f82aff2e50b.tar.xz
Restore missing/broken Processor fields
Couple of properties taken from xyz.openbmc_project.Inventory.Item.Cpu got accidentally broken by refactoring in 5fb91ba400e04828. Tested: Browsed to https://<bmc>/redfish/v1/Systems/system/Processors/cpu0 and verified that exactly the two properties were now added. Signed-off-by: Jonathan Doman <jonathan.doman@intel.com> Change-Id: I5e5c96b80e952d6eb58ea00b3f2ecb3f59a792e9
Diffstat (limited to 'redfish-core/lib/processor.hpp')
-rw-r--r--redfish-core/lib/processor.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/redfish-core/lib/processor.hpp b/redfish-core/lib/processor.hpp
index 79b5305132..2ba97e281f 100644
--- a/redfish-core/lib/processor.hpp
+++ b/redfish-core/lib/processor.hpp
@@ -67,6 +67,14 @@ inline void
present = true;
aResp->res.jsonValue["TotalCores"] = *coresCount;
}
+ else if (property.first == "MaxSpeedInMhz")
+ {
+ const uint32_t* value = std::get_if<uint32_t>(&property.second);
+ if (value != nullptr)
+ {
+ aResp->res.jsonValue["MaxSpeedMHz"] = *value;
+ }
+ }
else if (property.first == "Socket")
{
const std::string* value =
@@ -78,7 +86,7 @@ inline void
}
else if (property.first == "ThreadCount")
{
- const int64_t* value = std::get_if<int64_t>(&property.second);
+ const uint16_t* value = std::get_if<uint16_t>(&property.second);
if (value != nullptr)
{
aResp->res.jsonValue["TotalThreads"] = *value;