diff options
author | Nick Bofferding <bofferdn@us.ibm.com> | 2017-07-21 11:15:42 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-07-28 10:43:42 -0400 |
commit | f54d606af645343351d086b1de237f021f38cb21 (patch) | |
tree | 5f0a86acb216888dc0f15e71c6032c0d795b444e /src/include/usr/ipmi | |
parent | 481baf1c81c945ce3d354097a6452cb8ecba38d6 (diff) | |
download | talos-hostboot-f54d606af645343351d086b1de237f021f38cb21.tar.gz talos-hostboot-f54d606af645343351d086b1de237f021f38cb21.zip |
Secure Boot: Shutdown after key transition
- Fence off istep path after istep dispatcher stops
- Automatically power off after a key transition has completed
- Added IPMI API to power off system
Change-Id: I74eaec08e86d0cbc46db6aa1674845c53bcf14d4
RTC: 174017
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43436
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: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Reviewed-by: Stephen M. Cprek <smcprek@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/ipmiif.H | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/src/include/usr/ipmi/ipmiif.H b/src/include/usr/ipmi/ipmiif.H index 09f0c4830..4dd5e7cbb 100644 --- a/src/include/usr/ipmi/ipmiif.H +++ b/src/include/usr/ipmi/ipmiif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -54,13 +54,30 @@ namespace IPMI MSG_STATE_GRACEFUL_SHUTDOWN, - // initate a reboot request - MSG_STATE_INITATE_POWER_CYCLE, + // initiate a reboot request + MSG_STATE_INITIATE_POWER_CYCLE, // Used to check range. Leave as last. - MSG_LAST_TYPE = MSG_STATE_INITATE_POWER_CYCLE, + MSG_LAST_TYPE = MSG_STATE_INITIATE_POWER_CYCLE, }; + /** + * @brief Returns whether IPMI message type is related to + * system shutdown/reboot or not + * + * @param[in] i_msgType IPMI message type in question + * + * @return bool True or false value indicating whether requested IPMI + * message type is related to system shutdown/reboot or not + */ + inline bool validShutdownRebootMsgType(const msg_type i_msgType) + { + return ( (i_msgType == MSG_STATE_SHUTDOWN) + || (i_msgType == MSG_STATE_SHUTDOWN_SEL) + || (i_msgType == MSG_STATE_GRACEFUL_SHUTDOWN) + || (i_msgType == MSG_STATE_INITIATE_POWER_CYCLE)); + } + // chassis power off request types enum power_request_type { @@ -349,12 +366,17 @@ namespace IPMI size_t max_buffer(void); /** - * Tells ipmirp to start a graceful reboot sequence - * + * @brief Initiate a graceful reboot sequence via the IPMI resource + * provider */ void initiateReboot(); /** + * @brief Initiate a power off sequence via the IPMI resource provider + */ + void initiatePowerOff(); + + /** * Structure to return BMC/IPMI information in */ struct BmcInfo_t |