summaryrefslogtreecommitdiffstats
path: root/src/include/usr
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2017-08-15 16:44:36 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-09-01 09:38:11 -0400
commit3d4caf24f7e90f183f93cbcb915470f7205bb7f4 (patch)
tree2dfba534dc100960f8d4a40d9fbbfef9ff832b61 /src/include/usr
parent7b2191a74ffc3b431c9ddb6c75b0fefc7f20d133 (diff)
downloadtalos-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')
-rw-r--r--src/include/usr/errl/errlentry.H24
-rw-r--r--src/include/usr/errl/errludcallout.H18
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H14
-rw-r--r--src/include/usr/ipmi/ipmiconfiglookup.H50
4 files changed, 103 insertions, 3 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index fd30b00be..555bcb4c1 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -573,6 +573,22 @@ public:
void addProcedureCallout(const HWAS::epubProcedureID i_procedure,
const HWAS::callOutPriority i_priority);
+
+ /**
+ * @brief Add a special sensor callout
+ * Adds the given sensor to the list of callouts for the log
+ *
+ * @param[in] i_sensorID Sensor ID
+ * @param[in] i_sensorType Type of sensor being added
+ * @param[in] i_priority Priority of the callout
+ *
+ * @return void
+ */
+ void addSensorCallout(const uint32_t i_sensorID,
+ const HWAS::sensorTypeEnum i_sensorType,
+ const HWAS::callOutPriority i_priority);
+
+
/**
* @brief Import flattened error log
*
@@ -650,6 +666,14 @@ private:
*/
epubSubSystem_t getSubSystem( HWAS::partTypeEnum i_partType ) const;
+ /**
+ * @brief maps a sensor type to a subsystem ID
+ *
+ * @param[in] i_sensorType Sensor Type.
+ *
+ * @return subsystem ID
+ */
+ epubSubSystem_t getSubSystem( HWAS::sensorTypeEnum i_sensorType ) const;
/**
* @brief The ErrlManager will call here to ask the
diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H
index d6f2423bd..663243809 100644
--- a/src/include/usr/errl/errludcallout.H
+++ b/src/include/usr/errl/errludcallout.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2015 */
+/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -159,6 +159,22 @@ private:
const HWAS::callOutPriority i_priority);
+ /**
+ * @brief Add a sensor callout
+ * Adds the given sensor to the list of callouts for the log
+ *
+ * @param[in] i_sensorID Sensor ID
+ * @param[in] i_sensorType Type of sensor being added
+ * @param[in] i_priority Priority of the callout
+ *
+ * @return void
+ */
+ ErrlUserDetailsCallout(const uint32_t i_sensorID,
+ const HWAS::sensorTypeEnum i_sensorType,
+ const HWAS::callOutPriority i_priority );
+
+
+
// Disabled
ErrlUserDetailsCallout(const ErrlUserDetailsCallout &);
ErrlUserDetailsCallout & operator=(const ErrlUserDetailsCallout &);
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
index 9a729a5ed..8f5126e6e 100644
--- a/src/include/usr/hwas/common/hwasCallout.H
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -145,8 +145,13 @@ enum partTypeEnum
PCI_REF_CLOCK = 11,
};
-
-
+enum sensorTypeEnum
+{
+ UNKNOWN_SENSOR = 0,
+ GPU_FUNC_SENSOR = 1,
+ GPU_TEMPERATURE_SENSOR = 2,
+ GPU_MEMORY_TEMP_SENSOR = 3,
+};
//
const uint8_t HW_CALLOUT = 0x01;
@@ -154,6 +159,7 @@ const uint8_t PROCEDURE_CALLOUT = 0x02;
const uint8_t BUS_CALLOUT = 0x03;
const uint8_t CLOCK_CALLOUT = 0x04;
const uint8_t PART_CALLOUT = 0x05;
+const uint8_t SENSOR_CALLOUT = 0x06;
const uint8_t TARGET_IS_SENTINEL = 0xF0;
@@ -188,6 +194,10 @@ typedef struct callout_ud
GARD_ErrorType partGardErrorType; // uint32_t
// one Target will follow
};
+ struct { // type == SENSOR_CALLOUT
+ uint32_t sensorId;
+ sensorTypeEnum sensorType;
+ };
}; // union
} callout_ud_t;
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
+ );
};
}
OpenPOWER on IntegriCloud