diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2012-10-16 00:13:25 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-11-03 14:39:41 -0500 |
commit | 0fb4ee347957ceb2b58a200551fe6cf2cc212e74 (patch) | |
tree | 14efe53094c44be5beb1afe62be4b65bf143014f /src/usr/hwpf/hwp/activate_powerbus | |
parent | 5aa9bef02647193eed4ce4d26851bd5d79c87c01 (diff) | |
download | talos-hostboot-0fb4ee347957ceb2b58a200551fe6cf2cc212e74.tar.gz talos-hostboot-0fb4ee347957ceb2b58a200551fe6cf2cc212e74.zip |
Return error when procedures fail during istep
Change-Id: I65686d261583ea84c7908f819071bd751fdb0e06
RTC: 39876
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1627
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: Paul Nguyen <nguyenp@us.ibm.com>
Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp/activate_powerbus')
-rw-r--r-- | src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C index 3b6a834b0..22ad5a613 100644 --- a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C @@ -45,6 +45,7 @@ #include <errl/errlentry.H> #include <initservice/isteps_trace.H> +#include <hwpisteperror.H> // targeting support #include <targeting/common/commontargeting.H> @@ -63,6 +64,8 @@ namespace ACTIVATE_POWERBUS { +using namespace ISTEP_ERROR; +using namespace ISTEP; using namespace TARGETING; using namespace EDI_EI_INITIALIZATION; using namespace fapi; @@ -75,9 +78,11 @@ using namespace fapi; // void* call_proc_build_smp( void *io_pArgs ) { + errlHndl_t l_errl = NULL; + IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_build_smp entry" ); // Get all functional proc chip targets @@ -178,26 +183,45 @@ void* call_proc_build_smp( void *io_pArgs ) l_procChips.push_back( l_procEntry ); } - // call the HWP with each fapi::Target - FAPI_INVOKE_HWP( l_errl, proc_build_smp, - l_procChips, SMP_ACTIVATE_PHASE1 ); + if(!l_errl) + { + // call the HWP with each fapi::Target + FAPI_INVOKE_HWP( l_errl, proc_build_smp, + l_procChips, SMP_ACTIVATE_PHASE1 ); + } - if ( l_errl ) + if(l_errl) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR : proc_build_smp" ); + /*@ + * @errortype + * @reasoncode ISTEP_ACTIVATE_POWER_BUS_FAILED + * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid ISTEP_PROC_BUILD_SMP + * @userdata1 bytes 0-1: plid identifying first error + * bytes 2-3: reason code of first error + * @userdata2 bytes 0-1: total number of elogs included + * bytes 2-3: N/A + * @devdesc call to proc_build_smp has failed + */ + l_StepError.addErrorDetails(ISTEP_ACTIVATE_POWER_BUS_FAILED, + ISTEP_PROC_BUILD_SMP, + l_errl); + + errlCommit( l_errl, HWPF_COMP_ID ); } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : proc_build_smp" ); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_build_smp" ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_build_smp exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_build_smp exit" ); - // end task, returning any errorlogs to IStepDisp - return l_errl; + // end task, returning any errorlogs to IStepDisp + return l_StepError.getErrorHandle(); } |