summaryrefslogtreecommitdiffstats
path: root/src/usr/sbeio
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/sbeio')
-rw-r--r--src/usr/sbeio/common/sbe_attn.C28
-rw-r--r--src/usr/sbeio/runtime/makefile1
-rw-r--r--src/usr/sbeio/runtime/sbeio_vital_attn.C97
3 files changed, 124 insertions, 2 deletions
diff --git a/src/usr/sbeio/common/sbe_attn.C b/src/usr/sbeio/common/sbe_attn.C
index a6fcb0583..5ad8152e1 100644
--- a/src/usr/sbeio/common/sbe_attn.C
+++ b/src/usr/sbeio/common/sbe_attn.C
@@ -36,6 +36,9 @@
#include <p9_extract_sbe_rc.H>
#include <sbeio/sbeioreasoncodes.H>
#include <sbeio/sbe_retry_handler.H>
+#include <sbeio/runtime/sbeio_attr_override.H>
+#include <sbeio/runtime/sbeio_vital_attn.H>
+#include <initservice/initserviceif.H>
extern trace_desc_t* g_trac_sbeio;
@@ -57,6 +60,16 @@ namespace SBEIO
TRACFCOMP( g_trac_sbeio, "handleVitalAttn> Returned SBE PLID=0x%x",
l_sbePlid);
+#ifdef __HOSTBOOT_RUNTIME
+ // Inform OPAL, SBE is currently disabled
+ if (TARGETING::is_sapphire_load())
+ {
+ // Inform OPAL of the inoperable SBE
+ l_errhdl = RT_SBEIO::vital_attn_inform_opal(i_procTarg,
+ RT_SBEIO::SBE_DISABLED);
+ }
+#endif
+
// @todo - RTC:180242 - Restart SBE
SbeRetryHandler l_sbeObj = SbeRetryHandler(
@@ -68,8 +81,19 @@ namespace SBEIO
l_sbeObj.main_sbe_handler(i_procTarg);
- // @todo - RTC:180244 - Disable the OCC
- // @todo - RTC:180245 - Inform OPAL
+#ifdef __HOSTBOOT_RUNTIME
+ // Inform OPAL the state of the SBE after a retry
+ if (l_sbeObj.getSbeRestart())
+ {
+ if (TARGETING::is_sapphire_load())
+ {
+ l_errhdl = RT_SBEIO::vital_attn_inform_opal(i_procTarg,
+ RT_SBEIO::SBE_ENABLED);
+ }
+
+ // @todo - RTC:180244 - Disable the OCC
+ }
+#endif
TRACFCOMP( g_trac_sbeio,
EXIT_MRK "handleVitalAttn> ");
diff --git a/src/usr/sbeio/runtime/makefile b/src/usr/sbeio/runtime/makefile
index 13fbaed12..541ad0b77 100644
--- a/src/usr/sbeio/runtime/makefile
+++ b/src/usr/sbeio/runtime/makefile
@@ -47,6 +47,7 @@ EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/sbe/
## Objects unique to HBRT
OBJS += rt_sbeio.o
OBJS += sbeio_attr_override.o
+OBJS += sbeio_vital_attn.o
OBJS += ${SBEIO_COMMON_OBJS}
VPATH += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/perv/
diff --git a/src/usr/sbeio/runtime/sbeio_vital_attn.C b/src/usr/sbeio/runtime/sbeio_vital_attn.C
new file mode 100644
index 000000000..8498d2c61
--- /dev/null
+++ b/src/usr/sbeio/runtime/sbeio_vital_attn.C
@@ -0,0 +1,97 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/sbeio/runtime/sbeio_vital_attn.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2018 */
+/* [+] International Business Machines Corp. */
+/* */
+/* */
+/* Licensed under the Apache License, Version 2.0 (the "License"); */
+/* you may not use this file except in compliance with the License. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+#include <sbeio/runtime/sbeio_vital_attn.H>
+
+#include <runtime/interface.h> // g_hostInterfaces
+#include <util/runtime/rt_fwreq_helper.H> // firmware_request_helper
+#include <sbeio/sbeioreasoncodes.H> // SBEIO_HANDLE_VITAL_ATTN
+
+extern trace_desc_t* g_trac_sbeio;
+
+using namespace ERRORLOG;
+using namespace SBEIO;
+using namespace TARGETING;
+
+namespace RT_SBEIO
+{
+ //------------------------------------------------------------------------
+ errlHndl_t vital_attn_inform_opal(TARGETING::TargetHandle_t i_procTarg,
+ SBE_STATE i_sbeState)
+ {
+ errlHndl_t l_err = nullptr;
+ do
+ {
+ if ((nullptr == g_hostInterfaces) ||
+ (nullptr == g_hostInterfaces->firmware_request))
+ {
+ TRACFCOMP( g_trac_sbeio, ERR_MRK"handleVitalAttn: "
+ "Hypervisor firmware_request interface not linked");
+
+ /*@
+ * @errortype
+ * @severity ERRL_SEV_INFORMATIONAL
+ * @moduleid SBEIO_RUNTIME_HANDLE_VITAL_ATTN
+ * @reasoncode SBEIO_RT_NULL_FIRMWARE_REQUEST_PTR
+ * @userdata1 HUID of target
+ * @userdata2 none
+ * @devdesc Unable to inform OPAL of SBE failure
+ */
+ l_err = new ErrlEntry( ERRL_SEV_INFORMATIONAL,
+ SBEIO_RUNTIME_HANDLE_VITAL_ATTN,
+ SBEIO_RT_NULL_FIRMWARE_REQUEST_PTR,
+ get_huid(i_procTarg),
+ 0, true);
+ break;
+ }
+
+ // Create the firmware_request request struct to send data
+ hostInterfaces::hbrt_fw_msg l_req_fw_msg;
+ uint64_t l_req_fw_msg_size = sizeof(l_req_fw_msg);
+ memset(&l_req_fw_msg, 0, l_req_fw_msg_size);
+
+ // Populate the firmware_request request struct with given data
+ l_req_fw_msg.io_type =
+ hostInterfaces::HBRT_FW_MSG_TYPE_SBE_STATE;
+ l_req_fw_msg.sbe_state.i_procId =
+ i_procTarg->getAttr<ATTR_HBRT_HYP_ID>();
+ l_req_fw_msg.sbe_state.i_state = i_sbeState;
+
+ // Create the firmware_request response struct to receive data
+ hostInterfaces::hbrt_fw_msg l_resp_fw_msg;
+ uint64_t l_resp_fw_msg_size = sizeof(l_resp_fw_msg);
+ memset(&l_resp_fw_msg, 0, l_resp_fw_msg_size);
+
+ // Make the firmware_request call
+ l_err = firmware_request_helper(l_req_fw_msg_size,
+ &l_req_fw_msg,
+ &l_resp_fw_msg_size,
+ &l_resp_fw_msg);
+ }
+ while(0);
+
+ return l_err;
+ } // end errlHndl_t vital_attn_inform_opal(...)
+
+} // end namespace RT_SBEIO
OpenPOWER on IntegriCloud