summaryrefslogtreecommitdiffstats
path: root/src/include/usr/ipmi
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2015-01-30 06:29:17 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-02-12 09:29:00 -0600
commit2dbd115aa927b95af61f9d691d068e3ae3989bad (patch)
treed2fb714b011d4b1d39b7c3636b8a4bc3c23c0203 /src/include/usr/ipmi
parent50a2fe79b94ebb35b7d2df88a1d29887f85efee2 (diff)
downloadtalos-hostboot-2dbd115aa927b95af61f9d691d068e3ae3989bad.tar.gz
talos-hostboot-2dbd115aa927b95af61f9d691d068e3ae3989bad.zip
Add support to retrieve the user power limit from the BMC
-Add support for DCMI get power limit command used to retrieve the limit setting and limit activation status from the BMC. Change-Id: I9bf7336bedd929d5202db8c48477d7025a5311ab RTC:122808 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15445 Tested-by: Jenkins Server Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: WILLIAM G. HOFFA <wghoffa@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/ipmi_reasoncodes.H2
-rw-r--r--src/include/usr/ipmi/ipmiif.H9
-rw-r--r--src/include/usr/ipmi/ipmisensor.H29
3 files changed, 39 insertions, 1 deletions
diff --git a/src/include/usr/ipmi/ipmi_reasoncodes.H b/src/include/usr/ipmi/ipmi_reasoncodes.H
index 2ad8a6d48..2df631f42 100644
--- a/src/include/usr/ipmi/ipmi_reasoncodes.H
+++ b/src/include/usr/ipmi/ipmi_reasoncodes.H
@@ -34,6 +34,7 @@ namespace IPMI
MOD_IPMISRV_SEND = 0x01, // IPMI::send/IPMI::sendrecv
MOD_IPMISRV_REPLY = 0x02, // IPMI::respond
MOD_IPMISENSOR = 0x03, // IPMI::sensor
+ MOD_IPMIDCMI = 0x04, // IPMI::sensor
};
enum IPMIReasonCode
@@ -49,6 +50,7 @@ namespace IPMI
RC_SENSOR_NOT_PRESENT = IPMI_COMP_ID | 0x09,
RC_SET_SENSOR_FAILURE = IPMI_COMP_ID | 0x0a,
RC_READ_EVENT_FAILURE = IPMI_COMP_ID | 0x0b,
+ RC_DCMI_CMD_FAILED = IPMI_COMP_ID | 0x0c,
};
};
diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H
index 79a9965c9..9b41bda3f 100644
--- a/src/include/usr/ipmi/ipmiif.H
+++ b/src/include/usr/ipmi/ipmiif.H
@@ -77,7 +77,8 @@ namespace IPMI
NETFUN_FIRMWARE = (0x08 << 2),
NETFUN_STORAGE = (0x0a << 2),
NETFUN_TRANPORT = (0x0c << 2),
- NETFUN_IBM = (0x3a << 2),
+ NETFUN_GRPEXT = (0x2c << 2),
+ NETFUN_IBM = (0x3a << 2),
// Overload the OEM netfun for a "none" netfun. We use this as a
// default for objects which will have their netfun filled in
@@ -236,6 +237,12 @@ namespace IPMI
inline const command_t pnor_request(void)
{ return std::make_pair(NETFUN_IBM, 0x07); }
+ // $TODO RTC:123256 - need to add code to get dcmi capabilities
+ // This is a dcmi message used to request the
+ // user defined power limit from the BMC.
+ inline const command_t get_power_limit(void)
+ { return std::make_pair(NETFUN_GRPEXT, 0x03); }
+
// Some helper messages
// Used to create an empty message for reception
inline const command_t no_command(void)
diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H
index 7575024a9..dfbfcb8ee 100644
--- a/src/include/usr/ipmi/ipmisensor.H
+++ b/src/include/usr/ipmi/ipmisensor.H
@@ -735,6 +735,35 @@ namespace SENSOR
*/
void updateBMCSensorStatus( TARGETING::TYPE i_type );
+ /**
+ * Helper function to return the system power limit from the BMC.
+ * This limit is set by the system administrator to limit the amout
+ * of power the system can use.
+ *
+ * @param[out] - o_powerLimit - user defined power limit setting.
+ * @param[out] - o_limitActive - indicates the limit has been activated
+ * using the dcmi "activate power limit"
+ * command.
+ *
+ */
+ errlHndl_t getUserPowerLimit( uint16_t &o_powerLimit,
+ bool &o_activeActive );
+
+ /**
+ * Helper function to return the system power limit from the BMC.
+ * This limit is set by the system administrator to limit the amount
+ * of power the system can use.
+ *
+ * @param[out] - o_sensor_numbers - pointer to a static array containing
+ * the sensor numbers for each of the 16
+ * apss channels
+ *
+ * const uint16_t (*array)[16] = NULL;
+ */
+ errlHndl_t getAPSSChannelSensorNumbers(
+ const uint16_t (* &o_sensor_numbers)[16]);
+
+
}; // end namespace
OpenPOWER on IntegriCloud