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/include | |
parent | 5aa9bef02647193eed4ce4d26851bd5d79c87c01 (diff) | |
download | blackbird-hostboot-0fb4ee347957ceb2b58a200551fe6cf2cc212e74.tar.gz blackbird-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/include')
-rw-r--r-- | src/include/usr/errl/errlentry.H | 92 | ||||
-rw-r--r-- | src/include/usr/errl/errlprvt.H | 48 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/hwpisteperror.H | 176 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/hwpistepud.H | 143 | ||||
-rw-r--r-- | src/include/usr/hwpf/hwp/hwpistepudparserfactory.H | 68 | ||||
-rw-r--r-- | src/include/usr/hwpf/istepreasoncodes.H | 64 |
6 files changed, 556 insertions, 35 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index bc9d8a32a..e92a362b9 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -198,19 +198,28 @@ public: */ void setModuleId( const uint8_t i_moduleId ); + /** + * @brief Get the unique error log identifier (EID) of the error log. + * + * @return The error log ID of the error log. + */ + uint32_t eid() const; /** - * @brief Get the unique platform log identifier (PLID) of the error log. - * In legacy FSP, you could have one platform log ID such that a - * of entry IDs (EIDs) related to a single PLID. So far in Hostboot, - * PLID == EID. As such, there is no setter in the ErrlEntry interface - * for EID. When flattened as PEL for export, EID will be set to PLID. + * @brief Get the platform log identifier (PLID) of the error log. + * In legacy FSP, you could have one platform log ID such that a series + * of entry IDs (EIDs) related to a single PLID. * * @return The platform log ID of the error log. */ uint32_t plid() const; - + /** + * @brief Set the platform log id for this error log. + * + * @return The platform log ID of the error log. + */ + void plid( uint32_t i_plid); /** * @brief Get the event type of the error log. @@ -291,7 +300,40 @@ public: */ void setTermState(const errlTermState_t i_termState); + /** + * @brief Add data to the iv_Src user data words. + * + * @param[in] i_data - information to add to the user data word 1. + * + * @return void + * + */ + void addUserData1( const uint64_t i_data ); + /** + * @brief Add data to the iv_Src user data words. + * + * @param[in] i_data - information to add to the user data word 2. + * + * @return void + * + */ + void addUserData2( const uint64_t i_data ); + /** + * @brief Return iv_Src user data words. + * + * @return data1 word from SRC + * + */ + uint64_t getUserData1() const; + + /** + * @brief Return iv_Src user data words. + * + * @return data2 word from SRC + * + */ + uint64_t getUserData2() const; /** * @brief Allows the caller to add a chunk of FFDC data in a log @@ -498,11 +540,21 @@ private: //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// +inline uint32_t ErrlEntry::eid() const +{ + return iv_Private.iv_eid; +} + inline uint32_t ErrlEntry::plid() const { return iv_Private.iv_plid; } - +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline void ErrlEntry::plid( uint32_t i_plid) +{ + iv_Private.iv_plid = i_plid; +} //////////////////////////////////////////////////////////////////////////// @@ -549,6 +601,32 @@ inline void ErrlEntry::setReasonCode( const uint16_t i_reasonCode ) //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// +inline void ErrlEntry::addUserData1( const uint64_t i_data ) +{ + iv_Src.iv_user1 = i_data; +} + +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline void ErrlEntry::addUserData2( const uint64_t i_data ) +{ + iv_Src.iv_user2 = i_data; +} +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline uint64_t ErrlEntry::getUserData1() const +{ + return iv_Src.iv_user1; +} +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// +inline uint64_t ErrlEntry::getUserData2() const +{ + return iv_Src.iv_user2; +} + +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// inline uint16_t ErrlEntry::reasonCode() const { return iv_Src.iv_reasonCode; diff --git a/src/include/usr/errl/errlprvt.H b/src/include/usr/errl/errlprvt.H index d8086b50b..86bfb820a 100644 --- a/src/include/usr/errl/errlprvt.H +++ b/src/include/usr/errl/errlprvt.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errlprvt.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/errlprvt.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 otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ #ifndef ERRLPRVT_H #define ERRLPRVT_H @@ -110,10 +110,10 @@ private: uint64_t iv_committed; // TODO Expects BCD_time8_t, but using timebase uint8_t iv_cid; // Creator 'B' (enum errlCreator) uint8_t iv_sctns; // count of sections - uint32_t iv_plid; // error log id + uint32_t iv_plid; // platform log id + uint32_t iv_eid; // Error Log ID // uint8_t iv_cssver[CSS_VER]; // TODO unused now, do we need this? - // uint32_t iv_eid; // TODO Error ID now same as PLID }; diff --git a/src/include/usr/hwpf/hwp/hwpisteperror.H b/src/include/usr/hwpf/hwp/hwpisteperror.H new file mode 100644 index 000000000..1f7be8213 --- /dev/null +++ b/src/include/usr/hwpf/hwp/hwpisteperror.H @@ -0,0 +1,176 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/hwpisteperror.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 */ +#ifndef __ISTEPERROR_H +#define __ISTEPERROR_H +/** + * @file isteperror.H + * + * Defines the following classes: + * + * IStepError: Handles creation of a top level error to incidate that a + * particular ISTEP has failed, all hwp error plids are added + * to the top level error. + */ + +#include <errl/errlentry.H> +#include <hwpf/istepreasoncodes.H> + + +namespace ISTEP_ERROR +{ + /** + * @class IStepError + * + * Inteface to the a top level error log returned to the ISTEP dispatcher when + * an individual step fails due to an error in a hardware procedure. + * + * The class may be used to aggregate the errors returned from procedures + * which may have been run in parallel. The top level error log will + * indicate the failed step and the module in which the error was created. + * Callers should note that only the addErrorDetails call should be used + * within a thread. + * + * NOTE: This class returns an allocated error log object which needs to + * deleted by the reciever. + * users must call getErrorHandle() to recieve the pointer which can + * be deleted. + * + */ + class IStepError + { + public: + /** + * @brief + */ + IStepError() + : iv_eHandle(NULL), iv_errorCount(0) + { + mutex_init( &iv_mutex ); + }; + + /** + * @brief Destructor + * + * Will free internal storage if getErrorHandle is not called + */ + ~IStepError() + { + mutex_destroy( &iv_mutex ); + + if( iv_eHandle ) + { + delete iv_eHandle; + } + }; + + /** + * @brief Adds selected error details from the passed in + * error to the top level istep error log object + * + * The expected usage for this object is to agrigate + * errors which may have been generated by hardware + * procedures which are run in parallel. + * + * The first call will initialize the internal object + * pointer allocating a new errl object as needed. + * Subsequent calls to this function will result in a new + * user data section being added to the top level error + * log with additional error data from the error handle + * passed in. + * + * NOTE: This function is thread safe. + * + * @param: reasoncode - reason code identifying which Istep has + * failed + * @param: modid - module id identifying which module or + * procedure has caused the error to be + * created + * + * @param i_err - error handle passed in, the internal code + * will parse specific details from the log + * passed in to include in the top level elog. + */ + void addErrorDetails(ISTEP::istepReasonCode reasoncode, + ISTEP::istepModuleId modid, + errlHndl_t i_err ); + + /** + * @brief Return an errlHndl_t which points to the internal error + * log object. + * + * Note: Caller must delete the errlHndl_t after use. + * This funciton is not thread safe + * + * @return iv_eHandle - error handle of top level ISTEP error to + * be returned to the ISTEP dispatcher. + * + */ + errlHndl_t getErrorHandle(); + + /** + * @brief Utility function to determine if the internal error handle + * is null. + * + * @return boolean + * true indicates errl handle is currently NULL; + * false indicates error object has been + * allocated; + * + * Note: This funciton is not thread safe + * + */ + bool isNull() const { return ((iv_eHandle == NULL ) ? true : false); }; + + private: + + // disable copy constructor + IStepError(const IStepError&); + + // serialize access to the internal data area + mutex_t iv_mutex; + + // pointer to the top level ISTEP error log, this log will be + // passed back to the istep dispatcher when a hardware proceudre + // fails. + errlHndl_t iv_eHandle; + + // count placed in user data 3 of the error log to indicate how + // many errors were captured in this top level elog + uint32_t iv_errorCount; + + }; + + inline errlHndl_t IStepError::getErrorHandle() + { + errlHndl_t l_err = iv_eHandle; + + // storage will be freed by destructor if the pointer is non-null + iv_eHandle = NULL; + + return l_err; + }; + + +}; + +#endif diff --git a/src/include/usr/hwpf/hwp/hwpistepud.H b/src/include/usr/hwpf/hwp/hwpistepud.H new file mode 100644 index 000000000..ab0d486c4 --- /dev/null +++ b/src/include/usr/hwpf/hwp/hwpistepud.H @@ -0,0 +1,143 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/hwpistepud.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 */ +#ifndef INITSVC_UDSTEP_H +#define INITSVC_UDSTEP_H + +/** + * @file initsvcudistep.H + * + * Defines the following classes: + * + * IStepUserDetailsIstep: Adds IStep FFDC to an error log as user detail data + * IStepUserDetailsParserIstep: Parses IStep FFDC user detail in an error log + */ + +#include <errl/errluserdetails.H> + +// user data type for istep error details +static const uint32_t HWP_UDT_STEP_ERROR_DETAILS = 0x01; + +namespace ISTEP_ERROR +{ + + /** + * @struct IStepUserDetailsIstepData + * + * Defines the user detail data + */ + struct HwpUserDetailsIstepErrorData + { + uint32_t eid; + uint32_t reasoncode; + }; + +#ifndef PARSER + + /** + * @class IStepUserDetailsIstep + * + * Adds IStep FFDC to an error log as user detail data + */ + class HwpUserDetailsIstep : public ERRORLOG::ErrlUserDetails + { + public: + /** + * @brief Constructor + * + * Captures the supplied IStep FFDC data internally + * + * @param i_err error log returned by hardware procdure + * + */ + HwpUserDetailsIstep( errlHndl_t i_err); + + HwpUserDetailsIstep( ); + + /** + * @brief Destructor + */ + virtual ~HwpUserDetailsIstep(); + + private: + // Disabled + HwpUserDetailsIstep(const HwpUserDetailsIstep &); + HwpUserDetailsIstep & operator=(const HwpUserDetailsIstep &); + }; + +#else // (if PARSER defined) + + /** + * @class IStepUserDetailsParserIstep + * + * Parses Istep user detail in an error log + */ + class HwpUserDetailsParserIstep : public ERRORLOG::ErrlUserDetailsParser + { + public: + /** + * @brief Constructor + */ + HwpUserDetailsParserIstep() {} + + /** + * @brief Destructor + */ + virtual ~HwpUserDetailsParserIstep() {} + + /** + * @brief Parses Istep 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 + { + HwpUserDetailsIstepErrorData * l_pData = + static_cast<HwpUserDetailsIstepErrorData *>(i_pBuffer); + + i_parser.PrintNumber("See error log ID:","0x%X", + ntohl(l_pData->eid)); + + i_parser.PrintNumber("Reasoncode:","0x%X", + ntohl(l_pData->reasoncode) ); + } + + private: + // Disabled + HwpUserDetailsParserIstep(const HwpUserDetailsParserIstep &); + HwpUserDetailsParserIstep & operator=( + const HwpUserDetailsParserIstep &); + }; +#endif + +} + +#endif + + diff --git a/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H b/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H new file mode 100644 index 000000000..be89a89f6 --- /dev/null +++ b/src/include/usr/hwpf/hwp/hwpistepudparserfactory.H @@ -0,0 +1,68 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/hwpf/hwp/hwpistepudparserfactory.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 */ +#ifndef __ISTEP_UDPARSERFACTORY_H +#define __ISTEP_UDPARSERFACTORY_H + +#ifdef PARSER + +/** + * @file initsvcudparserfactory.H + * + * Defines the IStepUserDetailsParserFactory.H class +*/ +#include <hwpf/istepvcreasoncodes.H> +#include <errl/errludparserfactory.H> + +namespace INITSERVICE +{ + +/** + * @class IStepUserDetailsParserFactory + * + * This factory produces ErrlUserDetailsParser objects to parse the specified + * InitService user detail data. +*/ +class IStepUserDetailsParserFactory : public ERRORLOG::ErrlUserDetailsParserFactory +{ +public: + + /** + * @brief Constructor + */ + IStepUserDetailsParserFactory() + { + registerParser<IStepUserDetailsParserIstep>( ISTEP_UDT_PLID ); + } + +private: + + // Disabled + IStepUserDetailsParserFactory(const IStepUserDetailsParserFactory &); + IStepUserDetailsParserFactory & operator=( + const IStepUserDetailsParserFactory &); +}; + +} + +#endif +#endif diff --git a/src/include/usr/hwpf/istepreasoncodes.H b/src/include/usr/hwpf/istepreasoncodes.H index 084f633ae..72e852827 100644 --- a/src/include/usr/hwpf/istepreasoncodes.H +++ b/src/include/usr/hwpf/istepreasoncodes.H @@ -50,9 +50,50 @@ enum istepModuleId ISTEP_STARTPAYLOAD_EXECUTE_UNIT_TESTS = 0x01, ISTEP_START_PAYLOAD_CALL_SHUTDOWN = 0x02, ISTEP_START_PAYLOAD_NOTIFY_FSP = 0x03, - ISTEP_ACTIVATE_SLAVE_CORES = 0x04, + ISTEP_HOST_ACTIVATE_SLAVE_CORES = 0x04, ISTEP_BUILD_WINKLE_IMAGES = 0x05, - ISTEP_CORE_ACTIVATE = 0x06, + ISTEP_PROC_STARTCLOCK_CHIPLETS = 0x06, + ISTEP_PROC_CHIPLET_SCOMINIT = 0x07, + ISTEP_PROC_SCOMOVERRIDE_CHIPLETS = 0x08, + ISTEP_FABRIC_IO_RUN_TRAINING = 0x09, + ISTEP_PROC_FAB_IOVALID = 0x0a, + ISTEP_PROC_BUILD_SMP = 0x0b, + ISTEP_MSS_MEMDIAG = 0x0c, + ISTEP_MSS_SCRUB = 0x0d, + ISTEP_HOST_BUILD_WINKLE = 0x0e, + ISTEP_IO_RUN_TRAINING = 0x0f, + ISTEP_PROC_CEN_FRAMEWORK = 0x10, + ISTEP_MEM_STARTCLOCKS = 0x11, + ISTEP_PROC_SET_PORE_BAR = 0x12, + ISTEP_PROC_PREP_MASTER_WINKLE = 0x13, + ISTEP_HOST_ACTIVATE_MASTER = 0x14, + ISTEP_PROC_SETUP_BARS = 0x15, + ISTEP_PROC_EXIT_CACHE_CONTAINED = 0x16, + ISTEP_MSS_EXTENT_SETUP = 0x17, + ISTEP_MSS_SETUP_BARS = 0x18, + ISTEP_MSS_SCOMINIT = 0x19, + ISTEP_MSS_DDR_PHY_RESET = 0x1a, + ISTEP_MSS_DRAMINIT = 0x1b, + ISTEP_MSS_DRAMINIT_TRAINING = 0x1c, + ISTEP_MSS_DRAMINIT_MC = 0x1d, + ISTEP_MSS_VOLT = 0x1e, + ISTEP_MSS_FREQ = 0x1f, + ISTEP_MSS_EFF_CONFIG = 0x20, + ISTEP_SBE_CENTAUR_INIT = 0x21, + ISTEP_PROC_REVERT_SBE_MCS_SETUP = 0x22, + ISTEP_HOST_IPL_COMPLETE = 0x23, + ISTEP_PROC_A_X_PCI_DMI_PLL_INITF = 0x24, + ISTEP_PROC_A_X_PCI_DMI_PLL_SETUP = 0x25, + ISTEP_PROC_FAPI_POREVE = 0x26, + ISTEP_PROC_CEN_FRAMELOCK = 0x27, + ISTEP_DMI_SCOMINIT = 0x28, + ISTEP_DMI_IO_RUN_TRAINING = 0x29, + ISTEP_PROC_OPT_MEMMAP = 0x2a, + ISTEP_MEM_PLL_SETUP = 0x2b, + ISTEP_PROC_SLW_BUILD = 0x2c, + ISTEP_PROC_FAB_IOVALID_EROR = 0x2d, + ISTEP_LOAD_PORE_IMAGE = 0x2e, + ISTEP_APPLY_PORE_GEN_CPU_REGS = 0x2f, }; /** @@ -69,8 +110,23 @@ enum istepReasonCode ISTEP_MBOX_MSG_NULL = ISTEP_COMP_ID | 0x03, ISTEP_BAD_RC = ISTEP_COMP_ID | 0x04, ISTEP_FAIL_MASTER_WINKLE_RC = ISTEP_COMP_ID | 0x05, -}; - + ISTEP_SLAVE_SBE_FAILED = ISTEP_COMP_ID | 0x06, + ISTEP_NEST_CHIPLETS_FAILED = ISTEP_COMP_ID | 0x07, + ISTEP_EDI_EI_INITIALIZATION_FAILED = ISTEP_COMP_ID | 0x08, + ISTEP_ACTIVATE_POWER_BUS_FAILED = ISTEP_COMP_ID | 0x09, + ISTEP_SBE_CENTAUR_INIT_FAILED = ISTEP_COMP_ID | 0x0a, + ISTEP_DMI_TRAINING_FAILED = ISTEP_COMP_ID | 0x0b, + ISTEP_MC_CONFIG_FAILED = ISTEP_COMP_ID | 0x0c, + ISTEP_DRAM_TRAINING_FAILED = ISTEP_COMP_ID | 0x0d, + ISTEP_DRAM_INITIALIZATION_FAILED = ISTEP_COMP_ID | 0x0e, + ISTEP_BUILD_WINKLE_IMAGES_FAILED = ISTEP_COMP_ID | 0x0F, + ISTEP_CORE_ACTIVATE_FAILED = ISTEP_COMP_ID | 0x10, + ISTEP_STEP_SEVENTEEN = ISTEP_COMP_ID | 0x11, + ISTEP_ESTABLISH_SYSTEM_SMP_FAILED = ISTEP_COMP_ID | 0x12, + ISTEP_STEP_NINETEEN = ISTEP_COMP_ID | 0x13, + ISTEP_LOAD_PAYLOAD_FAILED = ISTEP_COMP_ID | 0x14, + ISTEP_START_PAYLOAD_FAILED = ISTEP_COMP_ID | 0x15, }; // end ISTEP +} #endif |