diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 3d487e02e06..a41cb7bcf25 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,14 +508,19 @@ 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 diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index 99271a8da8c..370df7091de 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 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(section->iv_pData)->type == HWAS::HW_CALLOUT) + { + reinterpret_cast(section->iv_pData)->gardErrorType = HWAS::GARD_NULL; + reinterpret_cast(section->iv_pData)->deconfigState = HWAS::NO_DECONFIG; + } + else if (reinterpret_cast(section->iv_pData)->type == HWAS::CLOCK_CALLOUT) + { + reinterpret_cast(section->iv_pData)->clkGardErrorType = HWAS::GARD_NULL; + reinterpret_cast(section->iv_pData)->clkDeconfigState = HWAS::NO_DECONFIG; + } + else if (reinterpret_cast(section->iv_pData)->type == HWAS::PART_CALLOUT) + { + reinterpret_cast(section->iv_pData)->partGardErrorType = HWAS::GARD_NULL; + reinterpret_cast(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 3a0c4f02177..6e230fc3805 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 #include +// fapi2 HWP invoker +#include + +#include +#include + // 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(); - 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(); + + 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 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 aed17749f3b..9648ec80f75 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 a3332afe5d1..fe3f0cbae05 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 91b10109f7d..5f747e5c5e5 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);