summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2017-12-14 12:22:19 -0600
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-12-22 15:31:03 -0500
commit2e5deae5db69e175c2e4eb06f2afa4a48d00c66a (patch)
tree51489e53c521557d65f7353eec00c77882f96e36
parent536ae2496674e50bb9ca0b152ded65c25c7467d6 (diff)
downloadtalos-hostboot-2e5deae5db69e175c2e4eb06f2afa4a48d00c66a.tar.gz
talos-hostboot-2e5deae5db69e175c2e4eb06f2afa4a48d00c66a.zip
Add call to get the SBE RC and commit it to an error log
Change-Id: I9cb9a03a8c8530cf1476a0ddd4923fff43ca88ae RTC:180241 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/50952 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
-rw-r--r--src/include/usr/sbeio/sbe_attn.H51
-rw-r--r--src/include/usr/sbeio/sbeioreasoncodes.H4
-rw-r--r--src/usr/sbeio/sbe_attn.C41
3 files changed, 94 insertions, 2 deletions
diff --git a/src/include/usr/sbeio/sbe_attn.H b/src/include/usr/sbeio/sbe_attn.H
new file mode 100644
index 000000000..5be8c2bc8
--- /dev/null
+++ b/src/include/usr/sbeio/sbe_attn.H
@@ -0,0 +1,51 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/usr/sbeio/sbe_attn.H $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2017 */
+/* [+] 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 */
+#ifndef __SBE_ATTN_H
+#define __SBE_ATTN_H
+
+namespace SBEIO
+{
+
+ /**
+ * @brief Gathers FFDC and recovers from FFDC errors
+ *
+ * @param[in] i_procTarget - current proc target
+ *
+ * @return - NULL if no error
+ */
+ errlHndl_t handleVitalAttn( TARGETING::Target* i_procTarg );
+
+ /**
+ * @brief Gathers the SBE RC and commits to an error log
+ *
+ * @param[in] i_target - current proc target
+ *
+ * @return - plid code for the SBE rc error log
+ */
+ uint32_t getSbeRC( TARGETING::Target* i_target);
+
+}
+
+#endif
diff --git a/src/include/usr/sbeio/sbeioreasoncodes.H b/src/include/usr/sbeio/sbeioreasoncodes.H
index bdfe7fab7..a0b7aac68 100644
--- a/src/include/usr/sbeio/sbeioreasoncodes.H
+++ b/src/include/usr/sbeio/sbeioreasoncodes.H
@@ -55,6 +55,7 @@ enum sbeioModuleId
SBEIO_EXTRACT_RC_HANDLER = 0x0A,
SBEIO_HANDLE_SBE_REG_VALUE = 0x0B,
SBEIO_GET_FFDC_HANDLER = 0x0C,
+ SBEIO_GET_SBE_RC = 0x0D,
};
/**
@@ -120,6 +121,9 @@ enum sbeioReasonCode
SBEIO_RETURNED_FFDC = SBEIO_COMP_ID | 0x57,
SBEIO_SLAVE_TIMEOUT = SBEIO_COMP_ID | 0x58,
+ // SBE Vital Attention error codes
+ SBEIO_SBE_RC_VALUE_INFO = SBEIO_COMP_ID | 0x60,
+
// Remove once we collect the FFDC ourselves - @todo-RTC:144313
//termination_rc
SBEIO_HWSV_COLLECT_SBE_RC = SBEIO_COMP_ID | 0xFF,
diff --git a/src/usr/sbeio/sbe_attn.C b/src/usr/sbeio/sbe_attn.C
index 7a315e67b..502f8d0d9 100644
--- a/src/usr/sbeio/sbe_attn.C
+++ b/src/usr/sbeio/sbe_attn.C
@@ -28,6 +28,13 @@
*/
#include <errl/errlentry.H>
+#include <errl/errlmanager.H>
+#include <errl/errludtarget.H>
+#include <sbeio/sbe_attn.H>
+#include <fapi2/target.H>
+#include <fapi2/plat_hwp_invoker.H>
+#include <p9_extract_sbe_rc.H>
+#include <sbeio/sbeioreasoncodes.H>
extern trace_desc_t* g_trac_sbeio;
@@ -44,8 +51,11 @@ namespace SBEIO
TARGETING::get_huid(i_procTarg) );
errlHndl_t l_errhdl = nullptr;
- TRACFCOMP( g_trac_sbeio, "NOOP for now" );
- // @todo - RTC:180241 - Implement basic error handling
+ uint32_t l_sbePlid = getSbeRC(i_procTarg);
+
+ TRACFCOMP( g_trac_sbeio, "handleVitalAttn> Returned SBE PLID=0x%x",
+ l_sbePlid);
+
// @todo - RTC:180242 - Restart SBE
// @todo - RTC:180243 - Advanced error handling
// @todo - RTC:180244 - Disable the OCC
@@ -56,4 +66,31 @@ namespace SBEIO
return l_errhdl;
}
+ uint32_t getSbeRC(TARGETING::Target* i_target)
+ {
+ TRACFCOMP( g_trac_sbeio, ENTER_MRK "getSbeRC()");
+
+ errlHndl_t l_errl = nullptr;
+
+ uint32_t l_errlPlid = NULL;
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP> l_fapi2ProcTarget(
+ const_cast<TARGETING::Target*> (i_target));
+
+ P9_EXTRACT_SBE_RC::RETURN_ACTION l_ret =
+ P9_EXTRACT_SBE_RC::REIPL_UPD_SEEPROM;
+ FAPI_INVOKE_HWP(l_errl, p9_extract_sbe_rc,
+ l_fapi2ProcTarget, l_ret);
+
+ if(l_errl)
+ {
+ TRACFCOMP(g_trac_sbeio, "ERROR: p9_extract_sbe_rc HWP returning "
+ "errorlog PLID: 0x%x", l_errl->plid());
+
+ ERRORLOG::ErrlUserDetailsTarget(i_target).addToLog(l_errl);
+ l_errlPlid = l_errl->plid();
+ }
+
+ return l_errlPlid;
+ }
+
};
OpenPOWER on IntegriCloud