From 3d7aee811e82959c8f250ce8190ffb739280f6ee Mon Sep 17 00:00:00 2001 From: Roland Veloz Date: Tue, 27 Feb 2018 23:51:45 -0600 Subject: Inform OPAL of the state of the SBE after an attempt to restart Inform OPAL of the state of the SBE after an attempt to restart, either it is disabled or enabled after retry, along with the processor ID of the SBE. Change-Id: I66a58e866c602c53f41f7cdfbd798f613d3b4dab RTC:180245 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/54813 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Martin Gloff Reviewed-by: Christian R. Geddes Reviewed-by: Daniel M. Crowell --- src/usr/util/runtime/rt_fwreq_helper.C | 58 ++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 3 deletions(-) (limited to 'src/usr/util/runtime') diff --git a/src/usr/util/runtime/rt_fwreq_helper.C b/src/usr/util/runtime/rt_fwreq_helper.C index e4cf371d3..29e12e6e0 100644 --- a/src/usr/util/runtime/rt_fwreq_helper.C +++ b/src/usr/util/runtime/rt_fwreq_helper.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -190,6 +190,32 @@ errlHndl_t firmware_request_helper(uint64_t i_reqLen, void *i_req, } break; // END case hostInterfaces::HBRT_FW_MSG_TYPE_I2C_LOCK: + case hostInterfaces::HBRT_FW_MSG_TYPE_SBE_STATE: + { + TRACFCOMP(g_trac_runtime, + ERR_MRK"FSP is doing a reset/reload, " + "sending SBE vital attn to OPAL failed. " + "retry:%d/%d, rc:%d, procId:0x%08x, " + "state(0=disabled, 1=enable):%d", + i, + HBRT_FW_REQUEST_RETRIES, + rc, + l_req_fw_msg->sbe_state.i_procId, + l_req_fw_msg->sbe_state.i_state); + + // Pack user data 1 with Hypervisor return code and + // firmware request message type + l_userData1 = TWO_UINT32_TO_UINT64(rc, + l_req_fw_msg->io_type); + + // Pack user data 2 with processor ID of SBE + // and state of the SBE + l_userData2 = TWO_UINT32_TO_UINT64( + l_req_fw_msg->sbe_state.i_procId, + l_req_fw_msg->sbe_state.i_state); + } + break; // END case hostInterfaces::HBRT_FW_MSG_TYPE_SBE_STATE: + default: break; } // END switch (l_req_fw_msg->io_type) @@ -209,7 +235,8 @@ errlHndl_t firmware_request_helper(uint64_t i_reqLen, void *i_req, MBOX message type (FSP MSG) || chipID * @userdata2[32:63] SCOM data (HCODE Update) || - Message Type (FSP MSG) + Message Type (FSP MSG) || + SBE state * @devdesc The Firmware Request call failed */ l_err = new ErrlEntry(ERRL_SEV_INFORMATIONAL, @@ -350,6 +377,30 @@ errlHndl_t firmware_request_helper(uint64_t i_reqLen, void *i_req, l_userData2 = l_req_fw_msg->req_i2c_lock.i_chipId; } break; // END case hostInterfaces::HBRT_FW_MSG_TYPE_I2C_LOCK: + + case hostInterfaces::HBRT_FW_MSG_TYPE_SBE_STATE: + { + TRACFCOMP(g_trac_runtime, + ERR_MRK"Failed sending SBE vital attn to OPAL. " + "rc:0x%X, procId:0x%08x, " + "state(0=disabled, 1=enable):%d", + rc, + l_req_fw_msg->sbe_state.i_procId, + l_req_fw_msg->sbe_state.i_state); + + // Pack user data 1 with Hypervisor return code and + // firmware request message type + l_userData1 = TWO_UINT32_TO_UINT64(rc, + l_req_fw_msg->io_type); + + // Pack user data 2 with processor ID of SBE + // and state of the SBE + l_userData2 = TWO_UINT32_TO_UINT64( + l_req_fw_msg->sbe_state.i_procId, + l_req_fw_msg->sbe_state.i_state); + } + break; // END case hostInterfaces::HBRT_FW_MSG_TYPE_SBE_STATE: + default: break; } // END switch (l_req_fw_msg->io_type) @@ -369,7 +420,8 @@ errlHndl_t firmware_request_helper(uint64_t i_reqLen, void *i_req, MBOX message type (FSP MSG) || chipId * @userdata2[32:63] SCOM data (HCODE Update) || - Message Type (FSP MSG) + Message Type (FSP MSG) || + SBE state * @devdesc The Firmware Request call failed */ l_err = new ErrlEntry(ERRL_SEV_PREDICTIVE, -- cgit v1.2.3