diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2017-08-15 16:44:36 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-09-01 09:38:11 -0400 |
commit | 3d4caf24f7e90f183f93cbcb915470f7205bb7f4 (patch) | |
tree | 2dfba534dc100960f8d4a40d9fbbfef9ff832b61 /src/include/usr/ipmi | |
parent | 7b2191a74ffc3b431c9ddb6c75b0fefc7f20d133 (diff) | |
download | talos-hostboot-3d4caf24f7e90f183f93cbcb915470f7205bb7f4.tar.gz talos-hostboot-3d4caf24f7e90f183f93cbcb915470f7205bb7f4.zip |
Added Error log support for new GPU sensors
Change-Id: I8a0de390516fd02df07860b960db506899b13f14
RTC:178218
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/45116
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r-- | src/include/usr/ipmi/ipmiconfiglookup.H | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/include/usr/ipmi/ipmiconfiglookup.H b/src/include/usr/ipmi/ipmiconfiglookup.H index bc3290096..6f287d9c9 100644 --- a/src/include/usr/ipmi/ipmiconfiglookup.H +++ b/src/include/usr/ipmi/ipmiconfiglookup.H @@ -211,6 +211,28 @@ class IpmiConfigLookup } /** + * @brief Determines whether the passed in target has the GPU_SENSORS + * attribute. + * + * @param[in] i_tgt. The target to test. + * + * @reurn True if the target has the GPU_SENSORS attribute, false otherwise. + * + */ + inline static bool doesTargetHaveGPUSensorsAttr(TARGETING::Target * i_tgt) + { + if(!i_tgt) + { + return false; + } + + TARGETING::AttributeTraits<TARGETING::ATTR_GPU_SENSORS>::Type + l_gpuArray; + return i_tgt->tryGetAttr<TARGETING::ATTR_GPU_SENSORS>(l_gpuArray); + } + + +/** * @brief Given a passed in target, looks up IPMI_SENSOR data based upon * the passed in sensor number. * @@ -237,6 +259,34 @@ class IpmiConfigLookup uint8_t& o_entityId, TARGETING::SENSOR_NAME& o_sensorName ); + +/** + * @brief Given a passed in target, looks up GPU_SENSOR data based upon + * the passed in sensor number. + * + * @param[in] i_target. The target whose GPU_SENSORS attribute will be + * searched for information based upon the passed + * in sensor number. + * + * @param[in] i_sensorNumber. The GPU sensor whose information we wish + * to gather. + * + * @param[out] o_sensorType. The sensor type as read from the + * from the GPU_SENSOR_ARRAY. + * + * @param[out] o_entityId. The entity id associated with + * the sensor as read from the GPU_SENSOR_ARRAY. + * + * @param[out] o_sensorName. The sensor name as read from + * the GPU_SENSOR_ARRAY. + * + */ + static bool lookupGPUSensorInfo(TARGETING::Target * i_target, + uint32_t i_sensorNumber, + uint8_t& o_sensorType, + uint8_t& o_entityId, + TARGETING::SENSOR_NAME& o_sensorName + ); }; } |