diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2013-05-28 22:40:00 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-06-11 09:40:22 -0500 |
commit | 38426697653080768b76928d98b0b4d33f6f891e (patch) | |
tree | 21e6b7d62373a302a41f0ed0907174572cd15d3a /src | |
parent | 0e4d11615a5808b534ad7d0bbec53294c3f9f9f9 (diff) | |
download | talos-hostboot-38426697653080768b76928d98b0b4d33f6f891e.tar.gz talos-hostboot-38426697653080768b76928d98b0b4d33f6f891e.zip |
Set failing subsystem ID based on callout priority
Change-Id: I1b1dc7c9fc9331603246d8be7a5313fe84163f51
RTC:51414
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4746
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/errl/errlentry.H | 31 | ||||
-rw-r--r-- | src/include/usr/errl/errlsrc.H | 60 | ||||
-rw-r--r-- | src/include/usr/errl/errluh.H | 73 | ||||
-rw-r--r-- | src/include/usr/errl/hberrltypes.H | 59 | ||||
-rw-r--r-- | src/usr/errl/errlentry.C | 263 | ||||
-rw-r--r-- | src/usr/errl/test/errltest.H | 137 | ||||
-rw-r--r-- | src/usr/hwas/common/hwasCallout.C | 2 |
7 files changed, 558 insertions, 67 deletions
diff --git a/src/include/usr/errl/errlentry.H b/src/include/usr/errl/errlentry.H index 4e9d842a4..a34633df9 100644 --- a/src/include/usr/errl/errlentry.H +++ b/src/include/usr/errl/errlentry.H @@ -55,6 +55,7 @@ #include <errl/errlud.H> #include <hbotcompid.H> #include <targeting/common/target.H> +#include <attributeenums.H> namespace ERRORLOG @@ -267,7 +268,9 @@ public: */ void setSubSys(const epubSubSystem_t i_subSys) { + // hb has ssid defined in two places iv_User.iv_ssid = i_subSys; + iv_Src.iv_ssid = i_subSys; } @@ -450,11 +453,33 @@ public: private: -#if 0 - //@todo: Need to set EPUB_Sub system based on highest - // priority call out FRU + /** + * @brief Set the failing subsystem ID in the error log + * based on the highest priority callout. + * + */ + void setSubSystemIdBasedOnCallouts(); + + /** + * @brief maps the target type to corresponding subsystem ID + * + * @param[in] i_target Target Type. + * + * @return subsystem ID + */ + epubSubSystem_t getSubSystem( TARGETING::TYPE ); /** + * @brief maps the procedure to a corresponding subsystem ID + * + * @param[in] i_procedureId procedure. + * + * @return subsystem ID + */ + epubSubSystem_t getSubSystem( HWAS::epubProcedureID i_procedureId ); + +#if 0 + /** * @brief Adds a software section to the log which is * mostly used as a stack call indicator * diff --git a/src/include/usr/errl/errlsrc.H b/src/include/usr/errl/errlsrc.H index 8d29a54e0..66d907b84 100644 --- a/src/include/usr/errl/errlsrc.H +++ b/src/include/usr/errl/errlsrc.H @@ -1,26 +1,25 @@ -/* IBM_PROLOG_BEGIN_TAG - * This is an automatically generated prolog. - * - * $Source: src/include/usr/errl/errlsrc.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 - */ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/errl/errlsrc.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* 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 ERRLSRC_H #define ERRLSRC_H @@ -116,6 +115,21 @@ private: */ uint64_t flatSize() const; + /** + * @brief return the failing subsystem id value + * + * @return Failing subsystem ID + * + */ + epubSubSystem_t getSubSys() const { return iv_ssid; }; + + /** + * @brief set the failing subsystem id value in the SRC object + * + * + */ + void setSubSys( epubSubSystem_t i_ssid ){ iv_ssid = i_ssid; }; + // Instance data srcType_t iv_srcType : 8; // SRC type, the ?? in SRC ??xxxxxx diff --git a/src/include/usr/errl/errluh.H b/src/include/usr/errl/errluh.H index 5768d85d1..0e2f35e09 100644 --- a/src/include/usr/errl/errluh.H +++ b/src/include/usr/errl/errluh.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/errl/errluh.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/errluh.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2011,2013 */ +/* */ +/* 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 ERRLUH_H #define ERRLUH_H @@ -92,6 +92,21 @@ private: */ uint64_t flatten( void * io_pBuffer, const uint64_t i_cbBuffer ); + /** + * @brief return the failing subsystem id value + * + * @return Failing subsystem ID + * + */ + epubSubSystem_t getSubSys()const { return iv_ssid; }; + + /** + * @brief set the failing subsystem id value in the SRC object + * + * + */ + void setSubSys( epubSubSystem_t i_ssid ){ iv_ssid = i_ssid; }; + /** @brief Set the component ID into the user header. * Only should be called from ErrlEntry instance. @@ -102,9 +117,6 @@ private: */ void setComponentId( compId_t i_compId ); - - - // Instance variables // SctnHdr for 'UH' section ErrlSctnHdr iv_header; @@ -113,11 +125,11 @@ private: errlSeverity_t iv_severity; errlEventType_t iv_etype; - - // TODO may need getters/setters for these fields. Presently, - // they are defaulted at object creation time, and not set - // or gotten by anyone. + // failing sub system ID epubSubSystem_t iv_ssid; + + // these are defaulted at object creation + // no setters/getters are provided currently errlDomain_t iv_domain; errlVector_t iv_vector; uint16_t iv_actions; @@ -126,9 +138,6 @@ private: }; - - - /*****************************************************************************/ // Destructor diff --git a/src/include/usr/errl/hberrltypes.H b/src/include/usr/errl/hberrltypes.H index 90e40ad33..f8803df60 100644 --- a/src/include/usr/errl/hberrltypes.H +++ b/src/include/usr/errl/hberrltypes.H @@ -218,23 +218,66 @@ enum srcType_t }; - - /** * @brief Sub system definitions * Needs to fit into 1 byte for flattening purposes. * This represents the byte in an SRC in position * ..XX.... such as 81 in B181F00B. * - * Refer to errentry.H and this setter: - * void ErrlEntry::setSubSys(const epubSubSystem_t i_subSys); + * Refer to errentry.H and src/epub/fsp/epub_service_codes.H + * in fips code. */ enum epubSubSystem_t { - EPUB_RESERVED_0 = 0x00, - EPUB_FIRMWARE_SUBSYS = 0x80, - EPUB_FIRMWARE_SP = 0x81, - EPUB_UNKNOWN = 0xFF, + EPUB_RESERVED_0 = 0x00, + + // Processor subsystem + EPUB_PROCESSOR_SUBSYS = 0x10, + EPUB_PROCESSOR_FRU = 0x11, + EPUB_PROCESSOR_CHIP_CACHE = 0x12, + EPUB_PROCESSOR_UNIT = 0x13, + EPUB_PROCESSOR_BUS_CTL = 0x14, + + // Memory subsystem + EPUB_MEMORY_SUBSYS = 0x20, + EPUB_MEMORY_CONTROLLER = 0x21, + EPUB_MEMORY_BUS = 0x22, + EPUB_MEMORY_DIMM = 0x23, + EPUB_MEMORY_FRU = 0x24, + EPUB_EXTERNAL_CACHE = 0x25, + + // I/O Subsystem: hub + EPUB_IO_HUB = 0x31, + + // CEC Hardware + EPUB_CEC_HDW_SUBSYS = 0x50, + EPUB_CEC_HDW_VPD_INTF = 0x55, + EPUB_CEC_HDW_I2C_DEVS = 0x56, + EPUB_CEC_HDW_JTAG = 0x57, + EPUB_CEC_HDW_CHIP_INTF = 0x57, // includes JTAG, FSI, etc. + EPUB_CEC_HDW_CLK_CTL = 0x58, + EPUB_CEC_HDW_OP_PANEL = 0x59, + EPUB_CEC_HDW_TOD_HDW = 0x5A, + EPUB_CEC_HDW_SP_PHYP_INTF = 0x5C, + + // Power/Cooling subsystem + EPUB_POWER_SUBSYS = 0x60, + + // Others + EPUB_MISC_SUBSYS = 0x70, + EPUB_MISC_TEST_TOOL = 0x72, + EPUB_MISC_MULTIPLE_SUBSYS = 0x74, + EPUB_MISC_UNKNOWN = 0x75, + EPUB_MISC_INFORMATIONAL = 0x76, + + // Platform Firmware + EPUB_FIRMWARE_SUBSYS = 0x80, + EPUB_FIRMWARE_SP = 0x81, + EPUB_FIRMWARE_PHYP = 0x82, + + EPUB_FIRMWARE_HOSTBOOT = 0x8A, + EPUB_FIRMWARE_OCC = 0x8B, + EPUB_UNKNOWN = 0xFF, }; diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index c7fb36a12..62d47e598 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -44,6 +44,59 @@ #include <hwas/common/deconfigGard.H> #include <targeting/common/targetservice.H> +using namespace ERRORLOG; +using namespace HWAS; + +struct epubProcToSub_t +{ + epubProcedureID xProc; + epubSubSystem_t xSubSys; + +}; + +// Procedure to subsystem table. +static const epubProcToSub_t PROCEDURE_TO_SUBSYS_TABLE[] = +{ + { EPUB_PRC_FIND_DECONFIGURED_PART , EPUB_CEC_HDW_SUBSYS }, + { EPUB_PRC_SP_CODE , EPUB_FIRMWARE_SP }, + { EPUB_PRC_PHYP_CODE , EPUB_FIRMWARE_PHYP }, + { EPUB_PRC_ALL_PROCS , EPUB_PROCESSOR_SUBSYS }, + { EPUB_PRC_ALL_MEMCRDS , EPUB_MEMORY_SUBSYS }, + { EPUB_PRC_INVALID_PART , EPUB_CEC_HDW_SUBSYS }, + { EPUB_PRC_LVL_SUPP , EPUB_MISC_SUBSYS }, + { EPUB_PRC_PROCPATH , EPUB_CEC_HDW_SUBSYS }, + { EPUB_PRC_NO_VPD_FOR_FRU , EPUB_CEC_HDW_VPD_INTF }, + { EPUB_PRC_MEMORY_PLUGGING_ERROR , EPUB_MEMORY_SUBSYS }, + { EPUB_PRC_FSI_PATH , EPUB_CEC_HDW_SUBSYS }, + { EPUB_PRC_PROC_AB_BUS , EPUB_PROCESSOR_BUS_CTL }, + { EPUB_PRC_PROC_XYZ_BUS , EPUB_PROCESSOR_BUS_CTL }, + { EPUB_PRC_MEMBUS_ERROR , EPUB_MEMORY_SUBSYS }, + { EPUB_PRC_EIBUS_ERROR , EPUB_CEC_HDW_SUBSYS }, + { EPUB_PRC_POWER_ERROR , EPUB_POWER_SUBSYS }, + { EPUB_PRC_PERFORMANCE_DEGRADED , EPUB_MISC_SUBSYS }, + { EPUB_PRC_HB_CODE , EPUB_FIRMWARE_HOSTBOOT }, +}; + +struct epubTargetTypeToSub_t +{ + TARGETING::TYPE xType; + epubSubSystem_t xSubSys; +}; +// Target type to subsystem table. +static const epubTargetTypeToSub_t TARGET_TO_SUBSYS_TABLE[] = +{ + { TARGETING::TYPE_DIMM , EPUB_MEMORY_DIMM }, + { TARGETING::TYPE_MEMBUF , EPUB_MEMORY_SUBSYS }, + { TARGETING::TYPE_PROC , EPUB_PROCESSOR_SUBSYS }, + { TARGETING::TYPE_EX , EPUB_PROCESSOR_UNIT }, + { TARGETING::TYPE_L4 , EPUB_MEMORY_SUBSYS }, + { TARGETING::TYPE_MCS , EPUB_MEMORY_CONTROLLER }, + { TARGETING::TYPE_MBA , EPUB_MEMORY_CONTROLLER }, + { TARGETING::TYPE_XBUS , EPUB_PROCESSOR_BUS_CTL }, + { TARGETING::TYPE_ABUS , EPUB_PROCESSOR_SUBSYS }, +}; + + namespace ERRORLOG { @@ -308,6 +361,8 @@ void ErrlEntry::commit( compId_t i_committerComponent ) // User header contains the component ID of the committer. iv_User.setComponentId( i_committerComponent ); + setSubSystemIdBasedOnCallouts(); + // Add the captured backtrace to the error log if (iv_pBackTrace) { @@ -317,6 +372,213 @@ void ErrlEntry::commit( compId_t i_committerComponent ) } } +/////////////////////////////////////////////////////////////////////////////// +// Function to set the correct subsystem ID based on callout priorities +void ErrlEntry::setSubSystemIdBasedOnCallouts() +{ + TRACFCOMP(g_trac_errl, INFO_MRK + "ErrlEntry::getSubSystemIdBasedOnCallouts()"); + + HWAS::callout_ud_t * pData = NULL; + + HWAS::callout_ud_t * highestPriorityCallout = NULL; + + // look thru the errlog for any Callout UserDetail sections + for( std::vector<ErrlUD*>::iterator it = iv_SectionVector.begin(); + it != iv_SectionVector.end(); + it++ ) + { + // look for a CALLOUT section + if ((ERRL_COMP_ID == (*it)->iv_header.iv_compId) && + (1 == (*it)->iv_header.iv_ver) && + (ERRL_UDT_CALLOUT == (*it)->iv_header.iv_sst)) + { + // its a callout, grab the priority + pData = reinterpret_cast<HWAS::callout_ud_t *> + ( (*it)->iv_pData ); + + // figure out the highest priority callout, just grab + // the first one if there are several with the same + // priority. + if( highestPriorityCallout == NULL || + ( pData->priority > highestPriorityCallout->priority) ) + { + highestPriorityCallout = pData; + } + } + } // for each SectionVector + + // if this pointer is not null it will be pointing to the + // highest priority entry + if( highestPriorityCallout == NULL ) + { + // no callouts in log, add default callout for hb code and + // add trace + TRACFCOMP(g_trac_errl, "WRN>> No callouts in elog 0x%.8X", eid()); + TRACFCOMP(g_trac_errl, "Adding default callout EPUB_PRC_HB_CODE "); + addProcedureCallout( HWAS::EPUB_PRC_HB_CODE, + HWAS::SRCI_PRIORITY_LOW); + + iv_User.setSubSys( EPUB_FIRMWARE_HOSTBOOT ); + + } + else + { + pData = highestPriorityCallout; + + if( pData->type == HWAS::HW_CALLOUT ) + { + // rebuild the target from the entity path, then use + // the target type to determine the ssid + if (*((uint8_t *)(pData + 1)) != TARGET_IS_SENTINEL) + { + // copy the entity path from the data buffer + TARGETING::EntityPath ep; + memcpy(&ep, ( pData + 1), sizeof(ep)); + + // convert the EntityPath to a Target pointer + TARGETING::Target *pTarget = + TARGETING::targetService().toTarget(ep); + + TRACFCOMP(g_trac_errl, INFO_MRK + "mapping highest priority target 0x%x " + "callout to determine SSID", + pTarget->getAttr<TARGETING::ATTR_TYPE>() ); + + // use the target type to get the failing ssid. + iv_User.setSubSys( getSubSystem( + pTarget->getAttr<TARGETING::ATTR_TYPE>())); + } + else + { + // it was the sentinel -- so just use the proc ssid + iv_User.setSubSys( EPUB_PROCESSOR_SUBSYS ); + } + } + else // ( pData->type == HWAS::PROCEDURE_CALLOUT ) + { + // for procedures, map the procedure to a subsystem + TRACFCOMP(g_trac_errl, INFO_MRK + "mapping highest priority procedure 0x%x " + "callout to determine SSID", pData->procedure); + + iv_User.setSubSys(getSubSystem( pData->procedure)); + + } + + // $TODO RTC72950 need to add support for HWAS::BUS_CALLOUT also + } + // add ssid to the SRC too, it is defined in the ErrlUH in FSP land + // in hb code it has been defined in both places and is also used + // in both places. + iv_Src.setSubSys( iv_User.getSubSys() ); + + TRACFCOMP(g_trac_errl, INFO_MRK + "ErrlEntry::setSubSystemIdBasedOnCallouts() " + "ssid selected 0x%X", iv_Src.getSubSys() ); + +} +/////////////////////////////////////////////////////////////////////////////// +// Map the target type to correct subsystem ID using a binary search +epubSubSystem_t ErrlEntry::getSubSystem( TARGETING::TYPE i_target ) +{ + + TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem()" + " i_target = 0x%x", i_target ); + + // local variables + epubSubSystem_t subsystem = EPUB_MISC_UNKNOWN; + + uint32_t TARGET_TO_SUBSYS_TABLE_ENTRIES = + sizeof(TARGET_TO_SUBSYS_TABLE)/ + sizeof(TARGET_TO_SUBSYS_TABLE[0]); + + uint32_t low = 0; + uint32_t high = TARGET_TO_SUBSYS_TABLE_ENTRIES - 1; + uint32_t mid = 0; + + while( low <= high ) + { + mid = low + (( high - low)/2); + + if ( TARGET_TO_SUBSYS_TABLE[mid].xType > i_target ) + { + high = mid -1; + } + else if ( TARGET_TO_SUBSYS_TABLE[mid].xType < i_target ) + { + low = mid + 1; + } + else + { + // found it + subsystem = TARGET_TO_SUBSYS_TABLE[mid].xSubSys; + break; + } + } + + if( subsystem == EPUB_MISC_UNKNOWN ) + { + TRACFCOMP(g_trac_errl,"WRN>> Failed to find subsystem ID for " + "target type 0x%x", i_target); + } + + TRACDCOMP(g_trac_errl, EXIT_MRK"getSubSystem() ssid 0x%x", subsystem ); + + return (subsystem); + +} + +/////////////////////////////////////////////////////////////////////////////// +// Map the procedure type to correct subsystem ID using a binary search +epubSubSystem_t ErrlEntry::getSubSystem( epubProcedureID i_procedure ) +{ + TRACDCOMP(g_trac_errl, ENTER_MRK"getSubSystem()" + " from procedure 0x%x", i_procedure ); + + // local variables + epubSubSystem_t subsystem = EPUB_MISC_UNKNOWN; + + uint32_t PROCEDURE_TO_SUBSYS_TABLE_ENTRIES = + sizeof(PROCEDURE_TO_SUBSYS_TABLE)/ + sizeof(PROCEDURE_TO_SUBSYS_TABLE[0]); + + uint32_t low = 0; + uint32_t high = PROCEDURE_TO_SUBSYS_TABLE_ENTRIES -1; + uint32_t mid = 0; + + while( low <= high ) + { + mid = low + (( high - low)/2); + + if ( PROCEDURE_TO_SUBSYS_TABLE[mid].xProc > i_procedure ) + { + high = mid -1; + } + else if ( PROCEDURE_TO_SUBSYS_TABLE[mid].xProc < i_procedure ) + { + low = mid + 1; + } + else + { + subsystem = PROCEDURE_TO_SUBSYS_TABLE[mid].xSubSys; + break; + } + } + + if( subsystem == EPUB_MISC_UNKNOWN ) + { + TRACFCOMP(g_trac_errl,"WRN>> Failed to find subsystem ID for " + "procedure 0x%x", i_procedure); + } + + TRACDCOMP(g_trac_errl, EXIT_MRK"getSubSystem()" + " ssid 0x%x", subsystem ); + + return (subsystem); +} + + /////////////////////////////////////////////////////////////////////////////// // for use by ErrlManager @@ -484,5 +746,6 @@ uint64_t ErrlEntry::flatten( void * o_pBuffer, uint64_t i_bufsize ) + } // End namespace diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index 97ac196be..5a8b1f769 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -478,6 +478,143 @@ public: while(0); #endif } + + /** + * @brief Test callouts + */ + void testErrl4(void) + { + TS_TRACE( "test testErrl4"); +#if 1 + // these tests deconfigure and gard targets. and even tho they + // restore their state after the tests, since the cxxtests are + // all run in parallel, during the time that a target is non- + // functional due to this test, another test may be running that + // might be adversly affected. + // tests are left in the code so that a developer can enable them + // to test these specific functions - just keep in mind that there + // could be side effects in other cxxtests. + TS_TRACE( " - SKIPPING -- other tests could be adversly affected"); +#else + do + { + // find a proc target + TARGETING::PredicateCTM procChipFilter( + TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC); + TARGETING::TargetRangeFilter pProc( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &procChipFilter); + + // find a membuf target + TARGETING::PredicateCTM membufChipFilter( + TARGETING::CLASS_CHIP,TARGETING::TYPE_MEMBUF); + TARGETING::TargetRangeFilter pMembuf( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &membufChipFilter); + + // Create an error log + errlHndl_t errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE); + + // test the different callout types + TS_TRACE( "test callout pProc %p", *pProc); + ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl); + + errl->addHwCallout(*pMembuf, + HWAS::SRCI_PRIORITY_MED, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addProcedureCallout( + HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, + HWAS::SRCI_PRIORITY_HIGH); + + errlCommit(errl, CXXTEST_COMP_ID); + + TS_TRACE( "testErrl4 done"); + + } + while(0); +#endif + } + + /** + * @brief Test callouts + */ + void testErrlr5(void) + { + TS_TRACE( "test testErrl5"); +#if 1 + // these tests deconfigure and gard targets. and even tho they + // restore their state after the tests, since the cxxtests are + // all run in parallel, during the time that a target is non- + // functional due to this test, another test may be running that + // might be adversly affected. + // tests are left in the code so that a developer can enable them + // to test these specific functions - just keep in mind that there + // could be side effects in other cxxtests. + TS_TRACE( " - SKIPPING -- other tests could be adversly affected"); +#else + do + { + // find a proc target + TARGETING::PredicateCTM procChipFilter( + TARGETING::CLASS_CHIP, TARGETING::TYPE_PROC); + TARGETING::TargetRangeFilter pProc( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &procChipFilter); + + // find a membuf target + TARGETING::PredicateCTM membufChipFilter( + TARGETING::CLASS_CHIP,TARGETING::TYPE_MEMBUF); + TARGETING::TargetRangeFilter pMembuf( + TARGETING::targetService().begin(), + TARGETING::targetService().end(), + &membufChipFilter); + + // Create an error log + errlHndl_t errl = new ERRORLOG::ErrlEntry( + ERRORLOG::ERRL_SEV_UNRECOVERABLE, + ERRL_TEST_MOD_ID, + ERRL_TEST_REASON_CODE); + + // test the different callout types + TS_TRACE( "test callout pProc %p", *pProc); + ERRORLOG::ErrlUserDetailsTarget(*pProc).addToLog(errl); + + errl->addHwCallout(*pMembuf, + HWAS::SRCI_PRIORITY_HIGH, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addHwCallout(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, + HWAS::SRCI_PRIORITY_LOW, + HWAS::DECONFIG, + HWAS::GARD_NULL); + + errl->addProcedureCallout( + HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, + HWAS::SRCI_PRIORITY_MED ); + + errlCommit(errl, CXXTEST_COMP_ID); + + TS_TRACE( "testErrl5 done"); + + } + while(0); +#endif + } + }; #endif diff --git a/src/usr/hwas/common/hwasCallout.C b/src/usr/hwas/common/hwasCallout.C index a536b62c4..64cc7b92c 100644 --- a/src/usr/hwas/common/hwasCallout.C +++ b/src/usr/hwas/common/hwasCallout.C @@ -112,7 +112,7 @@ void processCallout(errlHndl_t i_errl, case (PROCEDURE_CALLOUT): { HWAS_INF("Procedure callout; proc 0x%x priority 0x%x", - pCalloutUD->type, pCalloutUD->type); + pCalloutUD->procedure, pCalloutUD->priority); errlHndl_t errl = platHandleProcedureCallout(i_errl, pCalloutUD->procedure, pCalloutUD->priority); |