diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2017-12-14 11:52:15 -0600 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-12-21 16:51:42 -0500 |
commit | 6141805efc9ca2e9109ca29c837ee3f51d63b141 (patch) | |
tree | de6945f3e0ee156a152a9829467bb8cf09199c8a /src/include/usr/ipmi | |
parent | 25cb28c5a6cf36e77719a1ae3e8bd142e09cd491 (diff) | |
download | talos-hostboot-6141805efc9ca2e9109ca29c837ee3f51d63b141.tar.gz talos-hostboot-6141805efc9ca2e9109ca29c837ee3f51d63b141.zip |
Add HB_VOLATILE sensor so OpenBMC can mark volatile sections
Set sensor to 1 to tell OpenBMC code to allow hostboot
volatile section to be cleared.
RTC: 180772
Change-Id: Id63e3ae8a24facd5e01e8bf94688a60f066ba838
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51101
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-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>
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/usr/ipmi')
-rw-r--r-- | src/include/usr/ipmi/ipmi_reasoncodes.H | 1 | ||||
-rw-r--r-- | src/include/usr/ipmi/ipmisensor.H | 68 |
2 files changed, 69 insertions, 0 deletions
diff --git a/src/include/usr/ipmi/ipmi_reasoncodes.H b/src/include/usr/ipmi/ipmi_reasoncodes.H index 972391675..65d8e64d3 100644 --- a/src/include/usr/ipmi/ipmi_reasoncodes.H +++ b/src/include/usr/ipmi/ipmi_reasoncodes.H @@ -43,6 +43,7 @@ namespace IPMI MOD_IPMISENSOR_ENTITY_ID = 0x09, // IPMI::getSensorEntityId MOD_IPMISENSOR_NAME = 0x0A, // IPMI::getSensorName MOD_IPMISENSOR_REBOOTCNTRL = 0x0B, // IPMI::SENSOR getRebootControl + MOD_IPMISENSOR_HBVOLATILE = 0x0C, // IPMI::SENSOR getHbVolatile }; enum IPMIReasonCode diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H index 15499ce13..676833309 100644 --- a/src/include/usr/ipmi/ipmisensor.H +++ b/src/include/usr/ipmi/ipmisensor.H @@ -908,6 +908,74 @@ namespace SENSOR GpuSensor(); }; + + /** + * @class HbVolatileSensor + * + * @brief Specialized class for the hostboot volatile memory setup + * + * @par Detailed Description: + * Provides the functionality needed by OpenBMC to set hostboot + * section as volatile or not + * + * Usage: + * HbVolatileSensor l_hbVolatileCtl; + * l_hbVolatileCtl.setHbVolatile( HbVolatileSensor::ENABLE_VOLATILE ); + * l_hbVolatileCtl.setHbVolatile( HbVolatileSensor::DISABLE_VOLATILE ); + * + */ + class HbVolatileSensor : public SensorBase + { + + public: + + /** + * @enum hbVolatileSetting + * enum to define the contr + */ + enum hbVolatileSetting + { + DISABLE_VOLATILE = 0x00, // (default) + ENABLE_VOLATILE = 0x01, // allow volatile memory to be cleared + }; + + /** + * @brief Constructor for the HbVolatileSensor + * + * The system target holds the IPMI sensor number for this sensor. + * + */ + HbVolatileSensor(); + + /** + * @brief Destructor for the HbVolatileSensor + * + */ + ~HbVolatileSensor(); + + /** + * @brief Set hostboot volatile section to volatile or not + * + * @param[in] i_setting - enable/disable volatility of section + * + * @return Errorlog handle + * + */ + errlHndl_t setHbVolatile( hbVolatileSetting i_setting ); + + /** + * @brief get the value of the hostboot volatile + * section from the BMC. + * + * @param[o] i_setting - value = volatile or not + * + * @return Errorlog handle + * + */ + errlHndl_t getHbVolatile( hbVolatileSetting & o_setting ); + + }; + /** * @brief Updates initial state of Hostboot relevant fault sensors on the * BMC |