summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBill Hoffa <wghoffa@us.ibm.com>2019-01-30 09:49:50 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-03-01 14:17:42 -0600
commit7364f2447d187b1b7dfff42403db051c4fc7e4e4 (patch)
treecbb35a98c6bf9e455fbdb4fbdda25c2e02deeb8c /src
parent877a032b90cd231cb7a75df4b29955b957a8f06b (diff)
downloadtalos-hostboot-7364f2447d187b1b7dfff42403db051c4fc7e4e4.tar.gz
talos-hostboot-7364f2447d187b1b7dfff42403db051c4fc7e4e4.zip
Initialize and test alt-master PNOR access in all boots
- Update to istep 10 (call_host_slave_sbe_update) to validate the alternate master pnor chip in all boots (no-op for systems with only one pnor chip) - Updates to pnor callout logic to callout as a PNOR part for several of the error paths Change-Id: I9218f9a14496444288ea7985e1fb080c25f7f201 RTC: 200449 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71489 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/errl/errlentry.H19
-rw-r--r--src/usr/errl/errlentry.C29
-rw-r--r--src/usr/isteps/istep10/call_host_slave_sbe_update.C73
-rw-r--r--src/usr/isteps/istep10/makefile1
-rw-r--r--src/usr/pnor/pnor_sfcdd.C12
-rw-r--r--src/usr/pnor/pnorvalid.C35
6 files changed, 125 insertions, 44 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H
index 3d487e02e..a41cb7bcf 100644
--- a/src/include/usr/errl/errlentry.H
+++ b/src/include/usr/errl/errlentry.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -508,15 +508,20 @@ public:
void removeDuplicateTraces(void);
/**
- * @brief Remove the back trace user detail data
- * When an error log is constructed, the back trace is automatically
- * captured. This function removes the backtrace. This should be used when
- * a caller knows that the backtrace is of no use and wants to limit the
- * size of the error log.
- */
+ * @brief Remove the back trace user detail data
+ * When an error log is constructed, the back trace is automatically
+ * captured. This function removes the backtrace. This should be used when
+ * a caller knows that the backtrace is of no use and wants to limit the
+ * size of the error log.
+ */
void removeBackTrace();
/**
+ * @brief remove all deconfigure elements from an errorlog
+ */
+ void removeDeconfigure(void);
+
+ /**
* @brief Add a clock callout.
* The i_target is used to identify the actual clock to callout because
* some systems have multiple clocks of a given type. This target is
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C
index 99271a8da..370df7091 100644
--- a/src/usr/errl/errlentry.C
+++ b/src/usr/errl/errlentry.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -2004,6 +2004,33 @@ std::vector<void*> ErrlEntry::getUDSections(compId_t i_compId,
return copy_vector;
}
+void ErrlEntry::removeDeconfigure()
+{
+ //Loop through each section of the errorlog
+ for(auto & section : iv_SectionVector)
+ {
+ if (section->compId() == ERRL_COMP_ID && section->subSect() == ERRORLOG::ERRL_UDT_CALLOUT)
+ {
+ //Looking at hwasCallout.H only the HW, CLOCK, and PART Callouts have deconfigure entries,
+ // so only update those to ensure the ErrorType is GARD_NULL
+ if (reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->type == HWAS::HW_CALLOUT)
+ {
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->gardErrorType = HWAS::GARD_NULL;
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->deconfigState = HWAS::NO_DECONFIG;
+ }
+ else if (reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->type == HWAS::CLOCK_CALLOUT)
+ {
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->clkGardErrorType = HWAS::GARD_NULL;
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->clkDeconfigState = HWAS::NO_DECONFIG;
+ }
+ else if (reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->type == HWAS::PART_CALLOUT)
+ {
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->partGardErrorType = HWAS::GARD_NULL;
+ reinterpret_cast<HWAS::callout_ud_t*>(section->iv_pData)->partDeconfigState = HWAS::NO_DECONFIG;
+ }
+ }
+ }
+}
void ErrlEntry::removeDuplicateTraces()
{
diff --git a/src/usr/isteps/istep10/call_host_slave_sbe_update.C b/src/usr/isteps/istep10/call_host_slave_sbe_update.C
index 3a0c4f021..6e230fc38 100644
--- a/src/usr/isteps/istep10/call_host_slave_sbe_update.C
+++ b/src/usr/isteps/istep10/call_host_slave_sbe_update.C
@@ -47,6 +47,12 @@
#include <sys/time.h>
#include <hwas/common/hwasCommon.H>
+// fapi2 HWP invoker
+#include <fapi2/plat_hwp_invoker.H>
+
+#include <fapi2.H>
+#include <p9_sbe_lpc_init.H>
+
// Easy macro replace for unit testing
//#define TRACUCOMP(args...) TRACFCOMP(args)
#define TRACUCOMP(args...)
@@ -286,29 +292,60 @@ void* call_host_slave_sbe_update (void *io_pArgs)
#endif
- // Call to Validate any Alternative Master's connection to PNOR
- // Only call this in MNFG mode
- // Any error returned should not fail istep
+ // Run LPC Init on Alt Master Procs
+ // Get list of all processors
+ TARGETING::TargetHandleList l_procList;
+ TARGETING::getAllChips(l_procList,
+ TARGETING::TYPE_PROC,
+ true); // true: return functional targets
- // Get target service and the system target
- TargetService& tS = targetService();
- TARGETING::Target* sys = NULL;
- (void) tS.getTopLevelTarget( sys );
- assert(sys, "call_host_slave_sbe_update() system target is NULL");
-
- TARGETING::ATTR_MNFG_FLAGS_type mnfg_flags;
- mnfg_flags = sys->getAttr<TARGETING::ATTR_MNFG_FLAGS>();
- if ( mnfg_flags & MNFG_FLAG_THRESHOLDS )
+ // Loop through all processors
+ for (const auto & l_target : l_procList)
{
- l_errl = PNOR::validateAltMaster();
- if (l_errl)
+ // Check if processor is MASTER_CANDIDATE
+ TARGETING::ATTR_PROC_MASTER_TYPE_type type_enum =
+ l_target->getAttr<TARGETING::ATTR_PROC_MASTER_TYPE>();
+
+ if ( type_enum == TARGETING::PROC_MASTER_TYPE_MASTER_CANDIDATE )
{
- // Commit error
- errlCommit( l_errl, HWPF_COMP_ID );
- break;
+ // Initialize the LPC Bus by calling the p9_sbe_lpc_init hwp
+ fapi2::Target <fapi2::TARGET_TYPE_PROC_CHIP> l_fapi_target (l_target);
+ FAPI_INVOKE_HWP(l_errl, p9_sbe_lpc_init, l_fapi_target);
+
+ if (l_errl)
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ INFO_MRK"PNOR::validateAltMaster> p9_sbe_lpc_init returns error, rc=0x%X",
+ l_errl->reasonCode());
+
+ // capture the target data in the elog
+ ErrlUserDetailsTarget(l_target).addToLog(l_errl);
+ //Remove any deconfigure information, we only need the PNOR Part callout and do not want
+ // to deconfigure the entire proc because of a PNOR part problem
+ l_errl->removeDeconfigure();
+ // Commit error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ }
+ else
+ {
+ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace,
+ "SUCCESS running p9_sbe_lpc_init HWP on "
+ "target HUID %.8X", TARGETING::get_huid(l_target));
+ }
}
}
+ // Call to Validate any Alternative Master's connection to PNOR
+ // Any error returned should not fail istep
+ l_errl = PNOR::validateAltMaster();
+ if (l_errl)
+ {
+ //Remove any deconfigure information, we only need the PNOR Part callout and do not want
+ // to deconfigure the entire proc because of a PNOR part problem
+ l_errl->removeDeconfigure();
+ // Commit error
+ errlCommit( l_errl, HWPF_COMP_ID );
+ }
// Set SEEPROM_VERSIONS_MATCH attributes for each processor
// this will be used later on by the sbe_retry code to determine
@@ -316,7 +353,7 @@ void* call_host_slave_sbe_update (void *io_pArgs)
l_errl = SBE::querySbeSeepromVersions();
if(l_errl)
{
- l_StepError.addErrorDetails( l_errl);
+ l_StepError.addErrorDetails(l_errl);
errlCommit( l_errl, HWPF_COMP_ID);
}
diff --git a/src/usr/isteps/istep10/makefile b/src/usr/isteps/istep10/makefile
index aed17749f..9648ec80f 100644
--- a/src/usr/isteps/istep10/makefile
+++ b/src/usr/isteps/istep10/makefile
@@ -100,6 +100,7 @@ include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp1_scom.mk
include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp2_scom.mk
include ${INITFILES_HWP_PATH}/p9_fbc_cd_hp3_scom.mk
include ${PERV_HWP_PATH}/p9_update_security_ctrl.mk
+include ${PERV_HWP_PATH}/p9_sbe_lpc_init.mk
# Note that p9_int_scom.mk is included in fapi2.mk for
# workaround reasons so we are not including it here
diff --git a/src/usr/pnor/pnor_sfcdd.C b/src/usr/pnor/pnor_sfcdd.C
index a3332afe5..fe3f0cbae 100644
--- a/src/usr/pnor/pnor_sfcdd.C
+++ b/src/usr/pnor/pnor_sfcdd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2018 */
+/* Contributors Listed Below - COPYRIGHT 2011,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -420,10 +420,16 @@ PnorSfcDD::PnorSfcDD( TARGETING::Target* i_target )
if( l_err )
{
- TRACFCOMP( g_trac_pnor, "Failure to initialize the PNOR logic, shutting down :: RC=%.4X", ERRL_GETRC_SAFE(l_err) );
+ TRACFCOMP( g_trac_pnor, "Failure to initialize the PNOR logic :: RC=%.4X", ERRL_GETRC_SAFE(l_err) );
l_err->collectTrace(PNOR_COMP_NAME);
ERRORLOG::errlCommit(l_err,PNOR_COMP_ID);
- INITSERVICE::doShutdown( PNOR::RC_PNOR_INIT_FAILURE );
+
+ //Only shutdown if this error occurs on the master proc
+ if (TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL == iv_target)
+ {
+ TRACFCOMP( g_trac_pnor, "PNOR Error on Master Proc, shutting down");
+ INITSERVICE::doShutdown( PNOR::RC_PNOR_INIT_FAILURE );
+ }
}
TRACFCOMP(g_trac_pnor, EXIT_MRK "PnorSfcDD::PnorSfcDD()" );
diff --git a/src/usr/pnor/pnorvalid.C b/src/usr/pnor/pnorvalid.C
index 91b10109f..5f747e5c5 100644
--- a/src/usr/pnor/pnorvalid.C
+++ b/src/usr/pnor/pnorvalid.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2014,2018 */
+/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
@@ -191,6 +191,13 @@ errlHndl_t validateAltMaster( void )
TARGETING::get_huid(procList[i]), l_err->eid(),
l_err->reasonCode());
+ l_err->addPartCallout(
+ procList[i],
+ HWAS::PNOR_PART_TYPE,
+ HWAS::SRCI_PRIORITY_LOW,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL);
+
l_err->collectTrace(PNOR_COMP_NAME);
// if there was an error, commit here and then proceed to
@@ -216,13 +223,12 @@ errlHndl_t validateAltMaster( void )
TARGETING::get_huid(procList[i]), l_err->eid(),
l_err->reasonCode());
- // Limited in callout: no PNOR target, so calling out processor
- l_err->addHwCallout(
- procList[i],
- HWAS::SRCI_PRIORITY_HIGH,
- HWAS::NO_DECONFIG,
- HWAS::GARD_NULL );
-
+ l_err->addPartCallout(
+ procList[i],
+ HWAS::PNOR_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL);
l_err->collectTrace(PNOR_COMP_NAME);
@@ -260,13 +266,12 @@ errlHndl_t validateAltMaster( void )
TARGETING::get_huid(procList[i]),
0);
- // Limited in callout: no PNOR target, so calling out processor
- l_err->addHwCallout(
- procList[i],
- HWAS::SRCI_PRIORITY_HIGH,
- HWAS::NO_DECONFIG,
- HWAS::GARD_NULL );
-
+ l_err->addPartCallout(
+ procList[i],
+ HWAS::PNOR_PART_TYPE,
+ HWAS::SRCI_PRIORITY_HIGH,
+ HWAS::NO_DECONFIG,
+ HWAS::GARD_NULL);
TRACFBIN(g_trac_pnor, "tocBuffer", tocBuffer, 0x20);
OpenPOWER on IntegriCloud