diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2017-10-09 06:20:29 -0500 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2017-11-06 11:20:30 -0500 |
commit | 97f6525326d7ad9fa099be2b503a971c9325f503 (patch) | |
tree | ca00507985ae3805e22b672c82c6f94bbca183c1 /src/include/usr/ipmi | |
parent | cb260675de9f4f9025e0fc99687f6776e5f1bbac (diff) | |
download | talos-hostboot-97f6525326d7ad9fa099be2b503a971c9325f503.tar.gz talos-hostboot-97f6525326d7ad9fa099be2b503a971c9325f503.zip |
Control Host reboots for manufacturing
In a manufacturing environment it is desired to reboot once
(and only once) to get the FIRDATA analysis on checkstop.
This commit adds functionality to control the auto reboot policy
on the BMC. It then "remembers" the state using the HB VOLATILE
PNOR partition to enable reboots when in MFG mode.
Note that when in this mode, any reboot (even from host) will
terminate the boot.
Change-Id: If5ce133b59e10c659d7024d1ae08a40988e35190
RTC:180772
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48116
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Dean Sanner <dsanner@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r-- | src/include/usr/ipmi/ipmi_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/ipmi/ipmisensor.H | 66 |
2 files changed, 68 insertions, 0 deletions
diff --git a/src/include/usr/ipmi/ipmi_reasoncodes.H b/src/include/usr/ipmi/ipmi_reasoncodes.H index c8931bdb0..972391675 100644 --- a/src/include/usr/ipmi/ipmi_reasoncodes.H +++ b/src/include/usr/ipmi/ipmi_reasoncodes.H @@ -42,6 +42,7 @@ namespace IPMI MOD_IPMISENSOR_TYPE = 0x08, // IPMI::getSensorType MOD_IPMISENSOR_ENTITY_ID = 0x09, // IPMI::getSensorEntityId MOD_IPMISENSOR_NAME = 0x0A, // IPMI::getSensorName + MOD_IPMISENSOR_REBOOTCNTRL = 0x0B, // IPMI::SENSOR getRebootControl }; enum IPMIReasonCode @@ -61,6 +62,7 @@ namespace IPMI RC_SENSOR_NOT_FOUND = IPMI_COMP_ID | 0x0d, RC_INVALID_VPD_DATA = IPMI_COMP_ID | 0x0e, RC_INVALID_SENSOR_NUMBER = IPMI_COMP_ID | 0x0f, + RC_INVALID_SENSOR_SETTING = IPMI_COMP_ID | 0x10, }; }; diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H index 5b59a45c5..15499ce13 100644 --- a/src/include/usr/ipmi/ipmisensor.H +++ b/src/include/usr/ipmi/ipmisensor.H @@ -635,6 +635,72 @@ namespace SENSOR }; /** + * @class RebootControlSensor + * + * @brief Specialized class for the system reboot control + * + * @par Detailed Description: + * Provides the functionality needed to enable/disable auto reboot + * control controlled by the BMC. + * + * Usage: + * RebootControlSensor l_rbotCtl; + * l_rbotCtl.setRebootControl( autoRebootSetting::ENABLE_REBOOTS ); + * l_rbotCtl.setRebootControl( autoRebootSetting::DISABLE_REBOOTS ); + * + */ + class RebootControlSensor : public SensorBase + { + + public: + /** + * @enum autoRebootSetting + * enum to define the contr + */ + enum autoRebootSetting + { + DISABLE_REBOOTS = 0x00, // keep current state + ENABLE_REBOOTS = 0x01, // allow reboot for FIRDATA analysis + }; + + /** + * @brief Constructor for the RebootControlSensor + * + * The system target holds the IPMI sensor number for this sensor. + * + */ + RebootControlSensor(); + + /** + * @brief Destructor for the RebootControlSensor + * + */ + ~RebootControlSensor(); + + /** + * @brief Set reboots to enabled or disabled + * + * @param[in] i_setting - enable/disable + * + * @return Errorlog handle + * + */ + errlHndl_t setRebootControl( autoRebootSetting i_setting ); + + /** + * @brief get the value of the reboot control from the BMC. + * + * @param[o] i_setting - reboot control value + * + * @return Errorlog handle + * + */ + errlHndl_t getRebootControl( autoRebootSetting& o_setting ); + + }; + + + /** * @class StatusSensor * * @brief Specialized class to handle DIMM, PROC and Core status. |