summaryrefslogtreecommitdiffstats
path: root/src/include/usr/ipmi
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2014-12-08 15:27:36 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-01-09 16:27:06 -0600
commit031ea19e048867f5e25ec4bdfe38b64830eaf4fe (patch)
treec282456b3c6ff043352b569d9f52617c33113a62 /src/include/usr/ipmi
parent162d892ecec8dc8d7b45a6ee2ab2517adc56b594 (diff)
downloadblackbird-hostboot-031ea19e048867f5e25ec4bdfe38b64830eaf4fe.tar.gz
blackbird-hostboot-031ea19e048867f5e25ec4bdfe38b64830eaf4fe.zip
Create interface for the OCC_active sensor
add code to manipulate the Occ_Active sensor for use by htmgt and others. Change-Id: I4013a0999138d4c3901f8cb42f121589226e0bf3 RTC:119073 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/14783 Tested-by: Jenkins Server Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r--src/include/usr/ipmi/ipmisensor.H125
1 files changed, 102 insertions, 23 deletions
diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
index c060471ca..e27ce84b6 100644
--- a/src/include/usr/ipmi/ipmisensor.H
+++ b/src/include/usr/ipmi/ipmisensor.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014 */
+/* Contributors Listed Below - COPYRIGHT 2014,2015 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -42,6 +42,50 @@
namespace SENSOR
{
+
+ /**
+ * @enum procStatusSensorOffsets
+ * Sensor specific completion codes, defined in IPMI Spec.
+ *
+ */
+ enum procStatusSensorOffsets
+ {
+ IERR = 0x00,
+ THERMAL_TRIP = 0x01,
+ BIST_FAILURE = 0x02,
+ HANG_IN_POST = 0x03,
+ INIT_FAILURE = 0x04,
+ PROC_CONFIG_ERROR = 0x05,
+ BIOS_ERROR = 0x06,
+ PROC_PRESENCE_DETECTED = 0x07,
+ PROC_DISABLED = 0x08,
+ TERMINATOR_PRESNCE_DETECTED = 0x09,
+ PROCESSOR_THROTTLED = 0x0A,
+ MACHINE_CHECK_EXCEPTION = 0x0B,
+ CORRECTABLE_MACHINE_CHECK = 0x0C,
+
+ };
+
+ /**
+ * @enum dimmStatusSensorOffsets
+ * Dimm specific offsets for status sensor, defined in IPMI Spec.
+ *
+ */
+ enum dimmStatusSensorOffsets
+ {
+ CORRECTABLE_ECC_ERROR = 0x00,
+ UNCORRECTABLE_ECC_ERROR = 0x01,
+ PARITY_ERROR = 0x02,
+ MEMORY_SCRUB_ERROR = 0x03,
+ MEMORY_DEVICE_DISABLED = 0x04,
+ CORRECTABLE_ECC_ER_LIMIT_REACH = 0x05,
+ MEM_DEVICE_PRESENCE_DETECTED = 0x06,
+ MEM_CONFIG_ERROR = 0x07,
+ SPARE = 0x08,
+ MEMORY_AUTOMATICALLY_THROTTLED = 0x09,
+ CRITICAL_OVER_TEMP = 0x0A,
+ };
+
//** Bit definition for set sensor reading cmd operation field
// [7:6] 10b - write given values to event data bytes let BMC handle
// offset in event data 1 when an external event is
@@ -68,7 +112,7 @@ namespace SENSOR
static const uint16_t SENSOR_NAME_MINOR_MASK = 0x00FF;
/**
- * @struct set_sensor_reading_request
+ * @struct setSensorReadingRequest
* structure holding the data for the set sensor reading command which
* Hostboot will send to the BMC to update sensor status/readings.
*
@@ -91,7 +135,6 @@ namespace SENSOR
};
}PACKED;
-
/**
* @enum completionCode
* Sensor specific completion codes, defined in IPMI Spec.
@@ -103,27 +146,7 @@ namespace SENSOR
CC_EVENT_DATA_BYTES_NOT_SETTABLE = 0x81
};
- /**
- * @enum procStatusSensorOffsets
- * Sensor specific completion codes, defined in IPMI Spec.
- *
- */
- enum procStatusSensorOfffsets
- {
- PROC_PRESENT = 0x07,
- PROC_FUNCTIONAL_OFFSET = 0x08,
- };
- /**
- * @enum dimmStatusSensorOffsets
- * Dimm specific offsets for status sensor, defined in IPMI Spec.
- *
- */
- enum dimmStatusSensorOffsets
- {
- DIMM_PRESENT_OFFSET = 0x06,
- DIMM_FUNCTIONAL_OFFSET = 0x04,
- };
/**
* @class SensorBase
@@ -636,6 +659,62 @@ namespace SENSOR
*/
void updateBMCFaultSensorStatus(void);
+ /*
+ * @class OCCActiveSensor
+ *
+ * @brief Specialized class to handle OCC_Active sensors.
+ *
+ * @par Detailed Description:
+ * Provides the functionality needed to set the functional status of
+ * the OCCs. The object will determine from the Target* which of
+ * the OCC sensors to set. The OCC_Active sensor is defined as a
+ * processor type sensor so it will use the offsets defined in the
+ * ipmi spec for that type of sensor.
+ */
+
+ class OCCActiveSensor : public SensorBase
+ {
+
+ public:
+
+ /**
+ * @enum stateEnum
+ *
+ * enum defining the state of the OCC sensor
+ */
+ enum OccStateEnum
+ {
+ OCC_ACTIVE = 0x0001,
+ OCC_NOT_ACTIVE = 0x0002
+ };
+
+ /**
+ * @brief Constructor for an OccActive sensor
+ *
+ * The OCCActiveSensor sensor is used to mark the OCC as functional
+ *
+ * The IPMI sensor number for this sensor is associated with
+ * each instance of a Processor target.
+ *
+ */
+ OCCActiveSensor( TARGETING::Target * );
+
+ /**
+ * @brief Destructor for OCC_Active
+ *
+ */
+ ~OCCActiveSensor();
+
+ errlHndl_t setState( OccStateEnum i_state );
+
+ private:
+ // disable the default constructor
+ OCCActiveSensor();
+
+ uint8_t iv_functionalOffset;
+
+ };
+
/**
* @brief Update DIMM/CORE/Processor status sensors on the BMC.
* Update the present/functional status on the BMC for status sensors
OpenPOWER on IntegriCloud