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 | |
| parent | 481baf1c81c945ce3d354097a6452cb8ecba38d6 (diff) | |
| download | blackbird-hostboot-f54d606af645343351d086b1de237f021f38cb21.tar.gz blackbird-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')
| -rw-r--r-- | src/include/usr/initservice/initsvcreasoncodes.H | 1 | ||||
| -rw-r--r-- | src/include/usr/initservice/istepdispatcherif.H | 14 | ||||
| -rw-r--r-- | src/include/usr/ipmi/ipmiif.H | 34 |
3 files changed, 38 insertions, 11 deletions
diff --git a/src/include/usr/initservice/initsvcreasoncodes.H b/src/include/usr/initservice/initsvcreasoncodes.H index 31910bcef..29f73e253 100644 --- a/src/include/usr/initservice/initsvcreasoncodes.H +++ b/src/include/usr/initservice/initsvcreasoncodes.H @@ -77,6 +77,7 @@ enum InitServiceReasonCode //termination_rc SHUTDOWN_NOT_RECONFIG_LOOP = INITSVC_COMP_ID | 0x10, ISTEP_SKIP_ATTEMPTED = INITSVC_COMP_ID | 0x11, + ISTEP_PROCESSING_DISABLED = INITSVC_COMP_ID | 0x12, }; enum InitServiceUserDetailDataSubSection diff --git a/src/include/usr/initservice/istepdispatcherif.H b/src/include/usr/initservice/istepdispatcherif.H index 752f9ffff..1694c7942 100644 --- a/src/include/usr/initservice/istepdispatcherif.H +++ b/src/include/usr/initservice/istepdispatcherif.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -78,12 +78,16 @@ void stopIpl( void ); #ifdef CONFIG_BMC_IPMI /** - * @brief This function is to be used by external code to - * initate a system reboot via IPMI commands - * - * @return Nothing + * @brief This function is to be used by external code to + * initiate a system reboot via IPMI commands */ void requestReboot( void ); + +/** + * @brief This function is to be used by external code to + * initiate a system power off via IPMI commands + */ +void requestPowerOff( void ); #endif /** 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 |

