diff options
| author | Doug Gilbert <dgilbert@us.ibm.com> | 2014-04-07 16:49:18 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-04-11 12:46:40 -0500 |
| commit | a903c4f89dd12143ddb187ed8d7602d426fbaec5 (patch) | |
| tree | d66ca929f02bf9c73d220b1e8830050de9013db8 /src | |
| parent | d83e0f05717dc06edc537dcab1deb1758ba7dcf5 (diff) | |
| download | blackbird-hostboot-a903c4f89dd12143ddb187ed8d7602d426fbaec5.tar.gz blackbird-hostboot-a903c4f89dd12143ddb187ed8d7602d426fbaec5.zip | |
Sapphire OCC error handling in HBRT
Change-Id: Ie55785f586da6416c3d2a46767a2f9f17fad282c
RTC: 101156
Backport: release-fips810
CQ: SW256035
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10258
Tested-by: Jenkins Server
Reviewed-by: Corey V. Swenson <cswenson@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/include/runtime/interface.h | 6 | ||||
| -rw-r--r-- | src/usr/hwpf/hwp/occ/runtime/rt_occ.C | 73 |
2 files changed, 73 insertions, 6 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index eccf39bbd..f45f58b21 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -133,6 +133,12 @@ typedef struct hostInterfaces */ void (*nanosleep)(uint64_t i_seconds, uint64_t i_nano_seconds); + /** + * @brief Report an error to the host + * @param[in] Failing status that identifies the nature of the fail + * @param[in] Identifier that specifies the failing part + */ + void (*report_failure)( uint64_t i_status, uint64_t i_partId ); // Reserve some space for future growth. void (*reserved[32])(void); diff --git a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C index 98faec0a2..2701ca48d 100644 --- a/src/usr/hwpf/hwp/occ/runtime/rt_occ.C +++ b/src/usr/hwpf/hwp/occ/runtime/rt_occ.C @@ -36,9 +36,10 @@ #include <targeting/common/targetservice.H> #include <targeting/common/utilFilter.H> #include <targeting/common/util.H> - #include <runtime/rt_targeting.H> +#include <runtime/interface.h> + // fapi support #include <fapi.H> #include <fapiPlatHwpInvoker.H> @@ -223,7 +224,17 @@ namespace RT_OCC if ( err ) { + uint64_t status = err->plid(); errlCommit( err, HWPF_COMP_ID ); + + if(g_hostInterfaces && + g_hostInterfaces->report_failure) + { + + g_hostInterfaces->report_failure(status, + i_proc_chip); + } + if(rc == 0) { rc = -1; @@ -447,12 +458,29 @@ namespace RT_OCC err = stop_occ(*itarg, NULL); } - // TODO RTC 101156 - // error handling still being designed - // Need new interface from Sapphire? if( err ) { + uint64_t status = err->plid(); errlCommit( err, HWPF_COMP_ID ); + + if(g_hostInterfaces && + g_hostInterfaces->report_failure) + { + RT_TARG::rtChipId_t proc_chip = 0; + errlHndl_t err2 = + RT_TARG::getRtTarget(*itarg, proc_chip); + + if(err2) // should never happen + { + TRACFCOMP + (g_fapiTd, ERR_MRK + "Error converting target to RT chipID"); + errlCommit( err2, HWPF_COMP_ID ); + } + + g_hostInterfaces->report_failure(status, + proc_chip); + } err = NULL; rc = -1; // keep going @@ -491,11 +519,44 @@ namespace RT_OCC err = stop_occ(t0,t1); } - // TODO RTC 101156 Error handling still being designed - // Need new interface from Sapphire? if( err ) { + uint64_t status = err->plid(); errlCommit( err, HWPF_COMP_ID ); + + if(g_hostInterfaces && + g_hostInterfaces->report_failure) + { + RT_TARG::rtChipId_t proc_chip = 0; + errlHndl_t err2 = + RT_TARG::getRtTarget(t0, proc_chip); + + if(err2) // should never happen + { + TRACFCOMP + (g_fapiTd, ERR_MRK + "Error converting target to RT chipID"); + errlCommit( err2, HWPF_COMP_ID ); + } + + g_hostInterfaces->report_failure(status, + proc_chip); + + if(t1) + { + err2 = RT_TARG::getRtTarget(t1, proc_chip); + if(err2) // should never happen + { + TRACFCOMP + (g_fapiTd, ERR_MRK + "Error converting target to RT chipID"); + errlCommit( err2, HWPF_COMP_ID ); + } + + g_hostInterfaces->report_failure(status, + proc_chip); + } + } err = NULL; rc = -1; // keep going |

