Fix for "Unknown PLDM Entity Type in Numeric Effecter PDR"
Signed-off-by: Sagar Srinivas <sagar.srinivas@ibm.com>
Change-Id: I35bf0ca8c2e6555900444143c3d4d9e98157befb
diff --git a/configurations/pdr/11.json b/configurations/pdr/11.json
index 56c07f2..0eef36f 100644
--- a/configurations/pdr/11.json
+++ b/configurations/pdr/11.json
@@ -3880,13 +3880,11 @@
{
"pdrType" : 9,
"entries" : [{
- "type" : 193,
- "instance" : 0,
- "container" : 1,
+ "entity_path":"/xyz/openbmc_project/inventory/system",
"base_unit":72,
"rate_unit":0,
"effecter_resolutioninit":1,
- "effecter_data_size":4,
+ "effecter_data_size":0,
"range_field_format":3,
"dbus" : {
"path": "/xyz/openbmc_project/state/host0",
diff --git a/libpldmresponder/platform_numeric_effecter.hpp b/libpldmresponder/platform_numeric_effecter.hpp
index 93f659b..7b0f7d4 100644
--- a/libpldmresponder/platform_numeric_effecter.hpp
+++ b/libpldmresponder/platform_numeric_effecter.hpp
@@ -58,6 +58,11 @@
auto tempValue = std::get<uint8_t>(value);
value = static_cast<uint64_t>(tempValue);
}
+ else if (propertyType == "uint32_t")
+ {
+ auto tempValue = std::get<uint8_t>(value);
+ value = static_cast<uint32_t>(tempValue);
+ }
break;
}
case PLDM_EFFECTER_DATA_SIZE_SINT8:
@@ -89,6 +94,11 @@
auto tempValue = std::get<uint16_t>(value);
value = static_cast<uint64_t>(tempValue);
}
+ else if (propertyType == "uint32_t")
+ {
+ auto tempValue = std::get<uint16_t>(value);
+ value = static_cast<uint32_t>(tempValue);
+ }
break;
}
case PLDM_EFFECTER_DATA_SIZE_SINT16:
@@ -107,6 +117,11 @@
auto tempValue = std::get<int16_t>(value);
value = static_cast<uint64_t>(tempValue);
}
+ else if (propertyType == "uint32_t")
+ {
+ auto tempValue = std::get<int16_t>(value);
+ value = static_cast<uint32_t>(tempValue);
+ }
break;
}
case PLDM_EFFECTER_DATA_SIZE_UINT32:
@@ -125,6 +140,11 @@
auto tempValue = std::get<uint32_t>(value);
value = static_cast<uint64_t>(tempValue);
}
+ else if (propertyType == "uint32_t")
+ {
+ auto tempValue = std::get<uint32_t>(value);
+ value = static_cast<uint32_t>(tempValue);
+ }
break;
}
case PLDM_EFFECTER_DATA_SIZE_SINT32:
@@ -143,6 +163,11 @@
auto tempValue = std::get<int32_t>(value);
value = static_cast<uint64_t>(tempValue);
}
+ else if (propertyType == "uint32_t")
+ {
+ auto tempValue = std::get<int32_t>(value);
+ value = static_cast<uint32_t>(tempValue);
+ }
break;
}
}