diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/errl/errlentry.H | 171 | ||||
-rw-r--r-- | src/include/usr/errl/errlmanager.H | 87 | ||||
-rw-r--r-- | src/include/usr/errl/errlreasoncodes.H | 46 | ||||
-rw-r--r-- | src/include/usr/errl/errludcallout.H | 159 | ||||
-rw-r--r-- | src/include/usr/errl/errludparserfactoryerrl.H | 46 | ||||
-rw-r--r-- | src/include/usr/errl/hberrltypes.H | 46 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwasCallout.H | 231 | ||||
-rw-r--r-- | src/include/usr/hwas/common/hwas_reasoncodes.H | 2 | ||||
-rw-r--r-- | src/include/usr/hwas/deconfigGard.H | 69 |
9 files changed, 635 insertions, 222 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 32f9c2fe7..b3255a55b 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errlentry.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/errlentry.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef ERRLENTRY_H #define ERRLENTRY_H /** @@ -54,7 +55,8 @@ #include <errl/errlsrc.H> #include <errl/errlud.H> #include <hbotcompid.H> - +#include <targeting/common/target.H> +#include <hwas/common/hwasCallout.H> namespace ERRORLOG { @@ -359,85 +361,40 @@ public: */ void removeBackTrace(); -private: - /** - * @brief The ErrlManager will call here to ask the - * ErrlEntry to assign the time of commit, and to assign - * the commiter's comp ID. - * The ErrlManager is the primary user of this call. - * - */ - void commit( compId_t i_commiterComp ); - - - - /** - * @brief Compute the flattened size of an error log. It is typical - * to call this function for the size of buffer required, then - * allocate a buffer, then call flatten(). - * The ErrlManager is the primary user of this call. - * - * @return Size in bytes of the flattened data. - */ - uint64_t flattenedSize(); - - - /** - * @brief Flatten the data to caller's buffer. The resulting flat - * data will be in PEL (platform event log) format. - * The ErrlManager is the primary user of this call. - * - * @param[in,out] o_buffer Points to data block to be filled - * @param[in] i_cbBuffer Count of bytes in buffer supplied - * - * @return Count of bytes copied to caller's - * buffer or else zero if it does not fit. - */ - uint64_t flatten( void * o_buffer, const uint64_t i_cbBuffer ); - - - /** - * @brief Disabled copy constructor and assignment operator - */ - ErrlEntry(const ErrlEntry& i_right); - ErrlEntry& operator=(const ErrlEntry& i_right); - - - -#if 0 - - //@todo - The interfaces in this block still need support in order - // to have code written. - - - //@todo: Need to set EPUB_Sub system based on highest - // priority call out FRU /** - * @brief Add a hardware ( FRU ) callout + * @brief Add a hardware callout * - * @param[in] i_resourceId The resource identifier for the part * @param[in] i_target The hardware target + * @param[in] i_priority Priority of the callout + * @param [in] i_deconfigState Enum indicating whether the failing part + * should be deconfigured. + * @param [in] i_gardErrorType to indicate what type of failure occured * * @return void */ - void addFruCallout(const target_t i_target, - const callOutPriority_t i_priority); - + void addHwCallout(const TARGETING::Target *i_target, + const HWAS::callOutPriority i_priority, + const HWAS::DeconfigEnum i_deconfigState, + const HWAS::GARD_ErrorType i_gardErrorType); - //@todo: Need to set EPUB_Sub system based on highest - // priority procedure call out /** * @brief Add a procedure ( software ) callout * Adds the given service procedure to the list * of callouts for the log * - * @param[in] i_priority Priority of the callout * @param[in] i_procedure Procedure identifier. + * @param[in] i_priority Priority of the callout * * @return void */ - void addProcedureCallout(const epubProcedureId_t i_procedure, - const callOutPriority_t i_priority); + void addProcedureCallout(const HWAS::epubProcedureID i_procedure, + const HWAS::callOutPriority i_priority); + +private: + +#if 0 + //@todo: Need to set EPUB_Sub system based on highest + // priority call out FRU /** * @brief Adds a software section to the log which is @@ -465,6 +422,48 @@ private: #endif + + /** + * @brief The ErrlManager will call here to ask the + * ErrlEntry to assign the time of commit, and to assign + * the commiter's comp ID. + * The ErrlManager is the primary user of this call. + * + */ + void commit( compId_t i_commiterComp ); + + + /** + * @brief Compute the flattened size of an error log. It is typical + * to call this function for the size of buffer required, then + * allocate a buffer, then call flatten(). + * The ErrlManager is the primary user of this call. + * + * @return Size in bytes of the flattened data. + */ + uint64_t flattenedSize(); + + + /** + * @brief Flatten the data to caller's buffer. The resulting flat + * data will be in PEL (platform event log) format. + * The ErrlManager is the primary user of this call. + * + * @param[in,out] o_buffer Points to data block to be filled + * @param[in] i_cbBuffer Count of bytes in buffer supplied + * + * @return Count of bytes copied to caller's + * buffer or else zero if it does not fit. + */ + uint64_t flatten( void * o_buffer, const uint64_t i_cbBuffer ); + + + /** + * @brief Disabled copy constructor and assignment operator + */ + ErrlEntry(const ErrlEntry& i_right); + ErrlEntry& operator=(const ErrlEntry& i_right); + private: // Data Members ErrlPrvt iv_Private; // private header object diff --git a/src/include/usr/errl/errlmanager.H b/src/include/usr/errl/errlmanager.H index 7d41c0ea1..3dc21b895 100644 --- a/src/include/usr/errl/errlmanager.H +++ b/src/include/usr/errl/errlmanager.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errlmanager.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/errlmanager.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef ERRLMANAGER_H #define ERRLMANAGER_H /** @@ -40,15 +41,11 @@ #include <vector> #include <kernel/timemgr.H> #include <hbotcompid.H> - - - +#include <hwas/common/hwasCallout.H> namespace ERRORLOG { - - /** * @brief Global function to log an error * Writes the log to PNOR where committed logs are kept. @@ -68,8 +65,6 @@ namespace ERRORLOG * * @return None */ - -// TODO Work item 4104 to make comitter comp required, no default. void errlCommit(errlHndl_t& io_err, compId_t i_committerComp ); /*****************************************************************************/ @@ -119,6 +114,29 @@ public: */ uint32_t getUniqueErrId(); + /** + * @brief Sets the HWAS ProcessCallout function pointer + * + * This is called by HWAS to inform errlmanager that HWAS is loaded and + * therefore it can call HWAS to process callout information in an errlog + * + * It is a static function because a module cannot call an interface on a + * singleton in another module + */ + static void setHwasProcessCalloutFn(HWAS::processCalloutFn i_fn); + + /** + * @brief Returns the HWAS ProcessCallout function pointer + * + * This is called by ErrlEntry::commit to get the HWAS ProcessCallout + * function pointer, this is called to process callout information in an + * errlog, if NULL is returned then the function cannot be called (because + * the HWAS module is not loaded) + * + * @return HWAS::processCalloutFn function pointer + */ + HWAS::processCalloutFn getHwasProcessCalloutFn() const; + protected: /** * @brief Destructor @@ -166,8 +184,17 @@ private: /** * @brief Serialization for error log commits. */ - mutex_t iv_mutex; + mutex_t iv_commitMutex; + /** + * @brief Pointer to the HWAS processCallout function + */ + HWAS::processCalloutFn iv_hwasProcessCalloutFn; + + /** + * @brief Serialization for accessing iv_hwasProcessCalloutFn + */ + mutable mutex_t iv_hwasMutex; }; } // End namespace diff --git a/src/include/usr/errl/errlreasoncodes.H b/src/include/usr/errl/errlreasoncodes.H index fda12fcf9..bf10908b6 100644 --- a/src/include/usr/errl/errlreasoncodes.H +++ b/src/include/usr/errl/errlreasoncodes.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errlreasoncodes.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/errlreasoncodes.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef __ERRL_REASON_CODES_H #define __ERRL_REASON_CODES_H @@ -50,6 +51,7 @@ enum errlReasonCode HBERRL_TEST_REASON_CODE = HBERRL_COMP_ID | 0x03, HBERRL_TEST_ATTRIBUTE_UD = HBERRL_COMP_ID | 0x04, HBERRL_TEST_LOGREGISTER_UD = HBERRL_COMP_ID | 0x05, + HBERRL_TEST_CALLOUT_UD = HBERRL_COMP_ID | 0x06, //........ HBERRL_LAST_ERR = HBERRL_COMP_ID | 0xFF }; diff --git a/src/include/usr/errl/errludcallout.H b/src/include/usr/errl/errludcallout.H new file mode 100644 index 000000000..ce0fb6cec --- /dev/null +++ b/src/include/usr/errl/errludcallout.H @@ -0,0 +1,159 @@ +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/errludcallout.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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ +#ifndef ERRL_UDCALLOU_H +#define ERRL_UDCALLOU_H + +/** + * @file errludcallout.H + * + * Defines the following classes: + * + * ErrlUserDetailsCallout: Adds register FFDC to an error log as + * user detail data + * ErrlUserDetailsParserCallout: Parses register FFDC user detail in + * an error log +*/ + +#include <errl/errluserdetails.H> + +#ifndef PARSER + +// Forward reference +namespace TARGETING +{ + class Target; +} + +#include <hwas/common/hwasCallout.H> + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsCallout + * + * Adds Callout FFDC to an error log as user detail data + */ +class ErrlUserDetailsCallout : public ErrlUserDetails +{ +public: + + /** + * @brief Construct a hardware callout user detail + * + * @param[in] i_pTargetData The hardware target data + * @param[in] i_targetDataLength length of i_pTargetData + * @param[in] i_priority Priority of the callout + * @param [in] i_deconfigState Enum indicating whether the failing part + * should be deconfigured. + * @param [in] i_gardErrorType to indicate what type of failure occured + * + * @return void + */ + ErrlUserDetailsCallout( + const void *i_pTargetData, + uint32_t i_targetDataLength, + const HWAS::callOutPriority i_priority, + const HWAS::DeconfigEnum i_deconfigState, + const HWAS::GARD_ErrorType i_gardErrorType); + + /** + * @brief Add a procedure ( software ) callout + * Adds the given service procedure to the list + * of callouts for the log + * + * @param[in] i_procedure Procedure identifier. + * @param[in] i_priority Priority of the callout + * + * @return void + */ + ErrlUserDetailsCallout(const HWAS::epubProcedureID i_procedure, + const HWAS::callOutPriority i_priority); + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsCallout() { }; + +private: + // Disabled + ErrlUserDetailsCallout(const ErrlUserDetailsCallout &); + ErrlUserDetailsCallout & operator=(const ErrlUserDetailsCallout &); + +}; + +} + +#else // (if PARSER defined) + +namespace ERRORLOG +{ + +/** + * @class ErrlUserDetailsCallout + * + * Parses Callout user detail in an error log +*/ +class ErrlUserDetailsParserCallout : public ErrlUserDetailsParser +{ +public: + /** + * @brief Constructor + */ + ErrlUserDetailsParserCallout() {} + + /** + * @brief Destructor + */ + virtual ~ErrlUserDetailsParserCallout() {} + + /** + * @brief Parses callout user detail data from an error log + * + * @param i_version Version of the data + * @param i_parse ErrlUsrParser object for outputting information + * @param i_pBuffer Pointer to buffer containing detail data + * @param i_buflen Length of the buffer + */ + virtual void parse(errlver_t i_version, + ErrlUsrParser & i_parser, + void * i_pBuffer, + const uint32_t i_buflen) const + { + // TODO fix when parser fixed + // RTC 41707 + } + +private: + // Disabled + ErrlUserDetailsParserCallout(const ErrlUserDetailsParserCallout &); + ErrlUserDetailsParserCallout & operator=( + const ErrlUserDetailsParserCallout &); +}; + +} + +#endif + +#endif + diff --git a/src/include/usr/errl/errludparserfactoryerrl.H b/src/include/usr/errl/errludparserfactoryerrl.H index b38059465..5f5e7ad9b 100644 --- a/src/include/usr/errl/errludparserfactoryerrl.H +++ b/src/include/usr/errl/errludparserfactoryerrl.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errludparserfactoryerrl.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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/errludparserfactoryerrl.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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef ERRL_UDPARSERFACTORYERRL_H #define ERRL_UDPARSERFACTORYERRL_H @@ -60,6 +61,7 @@ public: registerParser<ErrlUserDetailsParserBackTrace>(HBERRL_UDT_BACKTRACE); registerParser<ErrlUserDetailsParserAttribute>(HBERRL_UDT_ATTRIBUTE); registerParser<ErrlUserDetailsParserLogRegister>(HBERRL_UDT_LOGREGISTER); + registerParser<ErrlUserDetailsParserCallout>(HBERRL_UDT_CALLOUT); } private: diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H index b9727a694..bea8b8345 100644 --- a/src/include/usr/errl/hberrltypes.H +++ b/src/include/usr/errl/hberrltypes.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/hberrltypes.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/errl/hberrltypes.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ #ifndef HBERRLTYPES_H #define HBERRLTYPES_H /** @@ -52,6 +53,7 @@ enum errlUserDataType_t HBERRL_UDT_BACKTRACE = 3, HBERRL_UDT_ATTRIBUTE = 4, HBERRL_UDT_LOGREGISTER = 5, + HBERRL_UDT_CALLOUT = 6, }; diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H new file mode 100644 index 000000000..e1078081b --- /dev/null +++ b/src/include/usr/hwas/common/hwasCallout.H @@ -0,0 +1,231 @@ +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/hwas/common/hwasCallout.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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ +#ifndef __HWAS_HWASCALLOUT_H +#define __HWAS_HWASCALLOUT_H +/** + * @file hwasCallout.H + * + * HardWare Availability Service Callout prototypes. + */ + + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <targeting/common/target.H> +#include <errl/errlud.H> + +namespace HWAS +{ +// from hwsv/server/hwsvTypes.H: +// Legacy HOM deconfig enum +enum DeconfigEnum +{ + NO_DECONFIG, + DECONFIG, + DELAYED_DECONFIG, +}; + +// from gard/fsp/GardExtIntData.H +typedef enum { + GARD_NULL = 0x00, + GARD_Pending = 0xE1, + GARD_PendingCmplt = 0xEE, + GARD_Unrecoverable = 0xE2, + GARD_Fatal = 0xE3, + GARD_Fabric = 0xE4, + GARD_Computation = 0xE5, + GARD_ComputationCmplt = 0xEC, + GARD_Predictive = 0xE6, + GARD_PredictiveCmplt = 0xE9, + GARD_ByAssociation = 0xE8, + GARD_ResourceRecovery = 0xEA, + GARD_Cmplt = 0xEF, + GARD_Func = 0xE7, + GARD_FuncCmplt = 0xEB, + GARD_DmaRecoverable = 0xE0, + GARD_DmaUnrecoverable = 0xED, + GARD_Tod = 0xD0, + GARD_TodCmplt = 0xD1, + GARD_Slb = 0xD2, + GARD_SlbCmplt = 0xD3, + GARD_ProcRecoverable = 0xD4, + GARD_ProcRecoverableCmplt = 0xD5, + GARD_TimeFac = 0xD6, + GARD_TimeFacCmplt = 0xD7, + GARD_GxBusError = 0xD8, + GARD_PowerBusError = 0xDA, + GARD_Withheld = 0xD9, + GARD_PoreError = 0xDC, + GARD_NxError = 0xDB, + GARD_Void = 0xFF +} GARD_ErrorType; + +// from src/epub/fsp/epub_service_codes.H +// nuVersionSID 1.24.14.36 versionSID 1.24.14.36 + /** @enum epubProcedureID + * This enumeration contains all the Procedures to be used with a callout + * in an SRC. + */ +enum epubProcedureID +{ + EPUB_PRC_NONE = 0x00, + EPUB_PRC_FIND_DECONFIGURED_PART = 0x01, + EPUB_PRC_EARLY_TERM = 0x02, + EPUB_PRC_USER_ERR = 0x03, + EPUB_PRC_SP_CODE = 0x04, + EPUB_PRC_PHYP_CODE = 0x05, + EPUB_PRC_INT_PROB = 0x06, + EPUB_PRC_TOD_PROB = 0x07, + EPUB_PRC_ALL_PROCS = 0x08, + EPUB_PRC_ALL_MEMCRDS = 0x09, + EPUB_PRC_INVALID_PART = 0x0A, + EPUB_PRC_RIO_PORTX = 0x0B, + EPUB_PRC_DIMM_CONNECTOR = 0x0C, + EPUB_PRC_FNM_CODE = 0x0D, + EPUB_PRC_WAIT_FOR_PHYP = 0x0E, + EPUB_PRC_SMA_CODE = 0x0F, + EPUB_PRC_LVL_SUPP = 0x10, + EPUB_PRC_SUE_PREVERROR = 0x11, + EPUB_PRC_CODE_UPDATE = 0x12, + EPUB_PRC_PLUG_COUNT_EXCEED = 0x13, + EPUB_PRC_SYSUNIT = 0x14, + EPUB_PRC_IOPATH = 0x15, + EPUB_PRC_PROCPATH = 0x16, + EPUB_PRC_FIPS_DUMP = 0x17, + EPUB_PRC_REBOOT = 0x18, + EPUB_PRC_THERMAL_FAULT = 0x19, + EPUB_PRC_BACKPLANE = 0x1A, + EPUB_PRC_ATTN_LINE = 0x1B, + EPUB_PRC_NO_VPD_FOR_FRU = 0x1C, + EPUB_PRC_IOBRIDGE = 0x1D, + EPUB_PRC_ANCHOR = 0x1E, + EPUB_PRC_SYSTEM_VPD = 0x1F, + EPUB_PRC_ENCLOSURE_VPD = 0x20, + EPUB_PRC_SURV_HMC_ERROR = 0x21, + EPUB_PRC_MEMORY_PLUGGING_ERROR = 0x22, + EPUB_PRC_MEM_SCRUB_REBOOT = 0x23, + EPUB_PRC_SMP_CABLE = 0x24, + EPUB_PRC_MS_PROC_TIMEOUT = 0x25, + EPUB_PRC_JTAG_PATH = 0x26, + EPUB_PRC_MNFG_DIMM_ISOLATION = 0x27, + EPUB_PRC_LOGAUTH_WARN = 0x28, + EPUB_PRC_IIC_BUS_ISOLATION = 0x29, + EPUB_PRC_FABRIC_ISOLATION = 0x2A, + EPUB_PRC_STATIC_IP = 0x2B, + EPUB_PRC_MUX_CARD = 0x2C, + EPUB_PRC_FSI_PATH = 0x2D, + EPUB_PRC_SERV_PROC = 0x2E, + EPUB_PRC_PSI_LINK = 0x2F, + EPUB_PRC_PROC_AB_BUS = 0x30, + EPUB_PRC_PROC_XYZ_BUS = 0x31, + EPUB_PRC_GX_SLOT = 0x32, + EPUB_PRC_MEMBUS_REPAIR = 0x33, + EPUB_PRC_MEMBUS_ERROR = 0x34, + EPUB_PRC_NET_SWITCH = 0x35, + EPUB_PRC_OVER_TEMP = 0x36, + EPUB_PRC_EIBUS_ERROR = 0x37, + EPUB_PRC_CCM_VPD_CARD = 0x38, + EPUB_PRC_HOST_ONE_NETWORK = 0x39, + EPUB_PRC_NET_CABLE_MISPLUG = 0x3A, + EPUB_PRC_NET_DATA_NOT_AVAILABLE = 0x3B, + EPUB_PRC_MAC_ADDRESS_DUP = 0x3C, + EPUB_PRC_INVALID_HUB_CONNECTION = 0x3D, + EPUB_PRC_MISSING_NODE = 0x3E, + EPUB_PRC_POWER_ERROR = 0x3F, + EPUB_PRC_NO_LINKS = 0x40, + EPUB_PRC_BAD_IP_SUBNET = 0x41, + EPUB_PRC_RFSP = 0x42, + EPUB_PRC_STANDBY_POWR = 0x43, + EPUB_PRC_FSP_LVL_SUPP = 0x44, + EPUB_PRC_BALANCED_MEMORY = 0x45, + EPUB_PRC_CHECK_POWR_SRCS = 0x46, + EPUB_PRC_BPC_PROC = 0x47, + EPUB_PRC_BLADE_LNK_DWN = 0x48, + EPUB_PRC_WRAP_PRBS = 0x49, + EPUB_PRC_PRBS_SWRAP = 0x4A, + EPUB_PRC_INVALID_IP = 0x4B, + EPUB_PRC_CCIN_NOT_FOUND = 0x4C, + EPUB_PRC_PERFORMANCE_DEGRADED = 0x4D, + EPUB_PRC_WKP_FAIL = 0x4E, + EPUB_PRC_MEMORY_UE = 0x4F, + EPUB_PRC_PLATFORM_CODE = 0x50, + EPUB_PRC_MAX +}; + +// from srci/fsp/srci.H +enum callOutPriority +{ + SRCI_PRIORITY_LOW = 1, + SRCI_PRIORITY_MEDC = 2, + SRCI_PRIORITY_MEDB = 3, + SRCI_PRIORITY_MEDA = 4, + SRCI_PRIORITY_MED = 5, + SRCI_PRIORITY_HIGH = 6 +}; + + +/** + * @brief processCallout process the userdetail for a callout, calling + * the deconfigure and/or GARD funcationality as appropriate + * + * @param[in] i_errlPlid Error log PLID to store in GARD Record. + * @param[in] i_pData Pointer to the callout bundle + * @param[in] i_Size size of the data in the callout bundle + * + * @return void + */ +void processCallout(const uint32_t i_errlPlid, + uint8_t *i_pData, + uint64_t i_Size); + +// typedef for function pointer that the errlog class will use. +typedef void (*processCalloutFn)(const uint32_t, uint8_t *, uint64_t); + +// +const uint8_t HW_CALLOUT = 0x01; +const uint8_t PROCEDURE_CALLOUT = 0x02; + +const uint8_t TARGET_IS_SENTINEL = 0xF0; + +typedef struct callout_ud +{ + uint8_t type; + callOutPriority priority; // uint8_t + union { + struct { // deconfigure / gard + DeconfigEnum deconfigState; // uint8_t + GARD_ErrorType gardErrorType; // uint8_t + uint32_t cpuid; + } __attribute__((packed)); + struct { // callout + epubProcedureID procedure; // uint8_t + } __attribute__((packed)); + }; +} __attribute__((packed)) callout_ud_t; + + +}; // end namespace + +#endif diff --git a/src/include/usr/hwas/common/hwas_reasoncodes.H b/src/include/usr/hwas/common/hwas_reasoncodes.H index afd26b95a..384bfba70 100644 --- a/src/include/usr/hwas/common/hwas_reasoncodes.H +++ b/src/include/usr/hwas/common/hwas_reasoncodes.H @@ -31,6 +31,7 @@ namespace HWAS enum HwasModuleID { MOD_DECONFIG_GARD = 0x01, + MOD_PROCESS_CALLOUT = 0x02, }; enum HwasReasonCode @@ -39,6 +40,7 @@ namespace HWAS RC_TARGET_NOT_GARDABLE = HWAS_COMP_ID | 0x02, RC_GARD_REPOSITORY_FULL = HWAS_COMP_ID | 0x03, RC_TARGET_NOT_FOUND_FOR_GARD_RECORD = HWAS_COMP_ID | 0x04, + RC_INVALID_TARGET = HWAS_COMP_ID | 0x05, }; }; diff --git a/src/include/usr/hwas/deconfigGard.H b/src/include/usr/hwas/deconfigGard.H index b3045d8b4..8d34070b7 100644 --- a/src/include/usr/hwas/deconfigGard.H +++ b/src/include/usr/hwas/deconfigGard.H @@ -1,25 +1,26 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/hwas/deconfigGard.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 2011 -// -// 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 other- -// wise divested of its trade secrets, irrespective of what has -// been deposited with the U.S. Copyright Office. -// -// Origin: 30 -// -// IBM_PROLOG_END +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/hwas/deconfigGard.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2011-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 other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ /** * @file deconfigGard.H * @@ -70,18 +71,6 @@ class DeconfigGard public: /** - * @enum GardSeverity - * - * Defines the possible severities of a GARD Record - */ - enum GardSeverity - { - GARD_SEVERITY_FATAL = 1, - GARD_SEVERITY_PREDICTIVE = 2, - GARD_SEVERITY_MANUAL = 3, - }; - - /** * @enum DeconfigCause * * Defines the possible causes for the creation of a Deconfigure Record @@ -110,7 +99,7 @@ public: uint32_t iv_chipMruEcid; // TODO is there an ECID type? }; uint32_t iv_errlogPlid; - uint8_t iv_severity; // Value from GardSeverity + uint8_t iv_errorType; // Value from GARD_ErrorType uint8_t iv_padding[3]; uint32_t iv_gardTime; }; @@ -122,7 +111,7 @@ public: /** * @struct DeconfigureRecord * - * Defines a Deconfigure Record + * Defines a Deconfigure Record for deferred deconfigures * * Only one Deconfigure Record can exist for a specific Target */ @@ -197,13 +186,13 @@ public: * * @param[in] i_target Reference to Target to create GARD Record for. * @param[in] i_errlPlid Error log PLID to store in GARD Record. - * @param[in] i_severity Severity of the GARD Record. + * @param[in] i_errorType error type of the GARD Record. * * @return errlHndl_t. Error log handle. */ errlHndl_t createGardRecord(const TARGETING::Target & i_target, const uint32_t i_errlPlid, - const GardSeverity i_severity); + const GARD_ErrorType i_errorType); /** * @brief Gets the specified Deconfigure Records. @@ -382,13 +371,13 @@ private: * * @param[in] i_target Reference to Target to create GARD Record for. * @param[in] i_errlPlid Error log PLID to store in GARD Record. - * @param[in] i_severity Severity of the GARD Record. + * @param[in] i_errorType Error Type of the GARD Record. * * @return errlHndl_t. Error log handle. */ errlHndl_t _createGardRecord(const TARGETING::Target & i_target, const uint32_t i_errlPlid, - const GardSeverity i_severity); + const GARD_ErrorType i_errorType); /** * @brief Clears the specified GARD Records. |