summaryrefslogtreecommitdiffstats
path: root/src/include/usr/ipmi
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2015-02-09 17:38:36 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-19 21:17:38 -0600
commitd479744400ed31923540c1c99d01638f4d2de0f0 (patch)
tree0d23c6eb4da2ef9dcf7a8a14338ef81ad78e4a4c /src/include/usr/ipmi
parent3a15c8bd258a5cb61821b9325f214a47b8faffbf (diff)
downloadtalos-hostboot-d479744400ed31923540c1c99d01638f4d2de0f0.tar.gz
talos-hostboot-d479744400ed31923540c1c99d01638f4d2de0f0.zip
Update to use uint32_t sensor numbers
-Add frequency sensor type/numbers -Add getTargetFromSensor interface -Fix missing gaps in DIMM Temp sensor range -Add Centaur Temp sensors -Move getSensorNumber to targeting Change-Id: Id788a60b4dc0171402817408e8c6d6dcd637048c RTC:123523 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15653 Tested-by: Jenkins Server Reviewed-by: Brian Silver <bsilver@us.ibm.com> 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/ipmiif.H3
-rw-r--r--src/include/usr/ipmi/ipmisensor.H27
2 files changed, 12 insertions, 18 deletions
diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
index 19d62c114..5856717ec 100644
--- a/src/include/usr/ipmi/ipmiif.H
+++ b/src/include/usr/ipmi/ipmiif.H
@@ -231,6 +231,9 @@ namespace IPMI
inline const command_t get_sensor_reading(void)
{ return std::make_pair(NETFUN_SENSOR, 0x2D); }
+ inline const command_t get_sensor_type(void)
+ { return std::make_pair(NETFUN_SENSOR, 0x2F); }
+
// OEM Messages
inline const command_t power_off(void)
{ return std::make_pair(NETFUN_IBM, 0x04); }
diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
index 13a2532ea..f65938c45 100644
--- a/src/include/usr/ipmi/ipmisensor.H
+++ b/src/include/usr/ipmi/ipmisensor.H
@@ -36,6 +36,7 @@
#include <targeting/common/target.H>
#include <errl/errlentry.H>
#include <targeting/common/targetservice.H>
+#include <targeting/targplatutil.H>
#include <ipmi/ipmiif.H>
#ifndef __IPMI_IPMISENSOR_H
@@ -103,9 +104,6 @@ namespace SENSOR
// Status command" for
// details on this byte.
- // sensors have the range 0x0-0xFE - 0xFF is reserved for invalid sensor
- static const uint16_t INVALID_SENSOR = 0xFF;
-
// Mask which preserves major type of the sensor
static const uint16_t SENSOR_NAME_MAJOR_MASK = 0xFF00;
@@ -156,7 +154,7 @@ namespace SENSOR
{
};
- }PACKED;
+ };
/**
* @enum completionCode
@@ -181,8 +179,6 @@ namespace SENSOR
READING_UNAVAILABLE = 0x20,
};
-
-
/**
* @class SensorBase
*
@@ -287,21 +283,16 @@ namespace SENSOR
/**
* @brief helper function to get the sensor nubmer
*/
- inline uint8_t getSensorNumber( )
+ inline uint32_t getSensorNumber( )
{
- return getSensorNumber(iv_target, iv_name );
+ return TARGETING::UTIL::getSensorNumber(iv_target, iv_name );
};
- /**
- * @brief return the sensor number
- *
- * @return sensor_number - sensor number for this sensor
- *
- */
- static uint8_t getSensorNumber(TARGETING::Target * i_targ,
- TARGETING::SENSOR_NAME i_name );
-
+ // return the sensor type and event reading data
+ errlHndl_t getSensorType(uint32_t i_sensorNumber,
+ uint8_t &o_sensorType,
+ uint8_t &o_eventReadingType );
protected:
@@ -780,7 +771,7 @@ namespace SENSOR
* sensor types, the "System Error" sensor number will be returned.
*
*/
- uint8_t getFaultSensorNumber(TARGETING::Target * i_pTarget );
+ uint32_t getFaultSensorNumber(TARGETING::Target * i_pTarget );
/**
OpenPOWER on IntegriCloud