diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/diag/mdia/mdiareasoncodes.H | 63 | ||||
-rw-r--r-- | src/usr/diag/mdia/mdiafwd.H | 1 | ||||
-rw-r--r-- | src/usr/diag/mdia/mdiasm.C | 31 |
3 files changed, 95 insertions, 0 deletions
diff --git a/src/include/usr/diag/mdia/mdiareasoncodes.H b/src/include/usr/diag/mdia/mdiareasoncodes.H new file mode 100644 index 000000000..bdfab0a1c --- /dev/null +++ b/src/include/usr/diag/mdia/mdiareasoncodes.H @@ -0,0 +1,63 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/diag/mdia/mdiareasoncodes.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2012 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ +/** + * @file mdiareasoncodes.H + * + * @brief Reason codes and module ids for memory diagnostics + * + */ +#ifndef __MDIA_MDIAREASONCODES_H +#define __MDIA_MDIAREASONCODES_H + +#include <hbotcompid.H> + +namespace MDIA +{ + +/** +* @enum Moduleid +* +* @brief Module Ids used in created errorlogs. Indicates which +* functions an error log was created in. +* +*/ +enum ModuleId +{ + INVALID_MODULE = 0x00, + PROCESS_COMMAND_TIMEOUT = 0x01, +}; + +/** + * @enum ReasonCode + * + * @brief Reasoncodes used to describe what errors are being indicated. + * + */ +enum ReasonCode +{ + INVALID_REASONCODE = HBMDIA_COMP_ID | 0x00, // Invalid Reasoncode + MAINT_COMMAND_TIMED_OUT = HBMDIA_COMP_ID | 0x01, +}; + +} +#endif diff --git a/src/usr/diag/mdia/mdiafwd.H b/src/usr/diag/mdia/mdiafwd.H index 8631b252b..75dd2a846 100644 --- a/src/usr/diag/mdia/mdiafwd.H +++ b/src/usr/diag/mdia/mdiafwd.H @@ -29,6 +29,7 @@ */ #include <mdia/mdia.H> +#include <mdia/mdiareasoncodes.H> #include <targeting/common/attributes.H> #include <vector> #include <map> diff --git a/src/usr/diag/mdia/mdiasm.C b/src/usr/diag/mdia/mdiasm.C index e9c13fb98..1e84a2aab 100644 --- a/src/usr/diag/mdia/mdiasm.C +++ b/src/usr/diag/mdia/mdiasm.C @@ -40,6 +40,7 @@ #include <diag/prdf/common/prdfMain.H> using namespace TARGETING; +using namespace ERRORLOG; using namespace std; using namespace fapi; @@ -76,6 +77,36 @@ void StateMachine::processCommandTimeout(const MonitorIDs & i_monitorIDs) { (*wit)->status = COMMAND_TIMED_OUT; wkflprop = *wit; + + // log a timeout event + + TargetHandle_t target = getTarget(**wit); + + MDIA_ERR("command %d timed out on: %p", + *((*wit)->workItem), + target); + + /*@ + * @errortype + * @reasoncode MDIA::MAINT_COMMAND_TIMED_OUT + * @severity ERRORLOG::ERRL_SEV_INFORMATIONAL + * @moduleid MDIA::PROCESS_COMMAND_TIMEOUT + * @userData1 Associated memory diag work item + * @devdesc A maint command timed out + */ + errlHndl_t err = new ErrlEntry( + ERRL_SEV_INFORMATIONAL, + PROCESS_COMMAND_TIMEOUT, + MAINT_COMMAND_TIMED_OUT, + *((*wit)->workItem), 0); + + err->addHwCallout(target, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errlCommit(err, HBMDIA_COMP_ID); + break; } } |