summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/runtime/interface.h6
-rw-r--r--src/usr/hwpf/hwp/occ/runtime/rt_occ.C73
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
OpenPOWER on IntegriCloud