diff options
Diffstat (limited to 'src/usr/errl')
| -rw-r--r-- | src/usr/errl/errlentry.C | 35 | ||||
| -rw-r--r-- | src/usr/errl/errludcallout.C | 28 | ||||
| -rw-r--r-- | src/usr/errl/plugins/errludcallout.H | 24 | ||||
| -rw-r--r-- | src/usr/errl/test/errltest.H | 5 | ||||
| -rw-r--r-- | src/usr/errl/test/errluserdetailtest.H | 6 |
5 files changed, 98 insertions, 0 deletions
diff --git a/src/usr/errl/errlentry.C b/src/usr/errl/errlentry.C index a10ab6fc4..ee23e4097 100644 --- a/src/usr/errl/errlentry.C +++ b/src/usr/errl/errlentry.C @@ -299,6 +299,41 @@ void ErrlEntry::removeBackTrace() //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// +void ErrlEntry::addClockCallout(const TARGETING::Target *i_target, + const HWAS::clockTypeEnum i_clockType, + const HWAS::callOutPriority i_priority) +{ + TRACFCOMP(g_trac_errl, ENTER_MRK"addClockCallout(%p, %d, 0x%x)", + i_target, i_clockType, i_priority); + + TARGETING::EntityPath ep; + const void *pData; + uint32_t size; + + if (i_target == TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL) + { + size = sizeof(HWAS::TARGET_IS_SENTINEL); + pData = &HWAS::TARGET_IS_SENTINEL; + } + else + { // we got a non MASTER_SENTINEL target, therefore the targeting + // module is loaded, therefore we can make this call. + ep = i_target->getAttr<TARGETING::ATTR_PHYS_PATH>(); + // size is total EntityPath size minus unused path elements + size = sizeof(ep) - + (TARGETING::EntityPath::MAX_PATH_ELEMENTS - ep.size()) * + sizeof(TARGETING::EntityPath::PathElement); + pData = &ep; + } + + ErrlUserDetailsCallout( pData, size, i_clockType, + i_priority).addToLog(this); + +} // addClockCallout + + +//////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////// void ErrlEntry::addBusCallout(const TARGETING::Target *i_target_endp1, const TARGETING::Target *i_target_endp2, const HWAS::busTypeEnum i_busType, diff --git a/src/usr/errl/errludcallout.C b/src/usr/errl/errludcallout.C index c206a628a..2e9b42cf7 100644 --- a/src/usr/errl/errludcallout.C +++ b/src/usr/errl/errludcallout.C @@ -38,6 +38,34 @@ namespace ERRORLOG extern TARGETING::TARG_TD_t g_trac_errl; //------------------------------------------------------------------------------ +// Clock callout +ErrlUserDetailsCallout::ErrlUserDetailsCallout( + const void *i_pTargetData, + uint32_t i_targetDataLength, + const HWAS::clockTypeEnum i_clockType, + const HWAS::callOutPriority i_priority) +{ + TRACDCOMP(g_trac_errl, "ClockCallout entry"); + + // Set up ErrlUserDetails instance variables + iv_CompId = ERRL_COMP_ID; + iv_Version = 1; + iv_SubSection = ERRL_UDT_CALLOUT; + + uint32_t pDataLength = sizeof(HWAS::callout_ud_t) + i_targetDataLength; + HWAS::callout_ud_t *pData; + pData = reinterpret_cast<HWAS::callout_ud_t *> + (reallocUsrBuf(pDataLength)); + pData->type = HWAS::CLOCK_CALLOUT; + pData->clockType = i_clockType; + pData->priority = i_priority; + memcpy(pData + 1, i_pTargetData, i_targetDataLength); + + TRACDCOMP(g_trac_errl, "ClockCallout exit; pDataLength %d", pDataLength); + +} // Clock callout + +//------------------------------------------------------------------------------ // Bus callout ErrlUserDetailsCallout::ErrlUserDetailsCallout( const void *i_pTarget1Data, diff --git a/src/usr/errl/plugins/errludcallout.H b/src/usr/errl/plugins/errludcallout.H index 8ea213d72..01d9000fd 100644 --- a/src/usr/errl/plugins/errludcallout.H +++ b/src/usr/errl/plugins/errludcallout.H @@ -73,6 +73,28 @@ public: switch (pData->type) { + case HWAS::CLOCK_CALLOUT: + { + switch (ntohl(pData->clockType)) + { +#define case_CLOCK_TYPE(_type) \ +case HWAS::_type: i_parser.PrintString( "Clock Type", #_type); break; + case_CLOCK_TYPE(TODCLK_TYPE) + case_CLOCK_TYPE(MEMCLK_TYPE) + case_CLOCK_TYPE(OSCREFCLK_TYPE) + case_CLOCK_TYPE(OSCPCICLK_TYPE) + default: + i_parser.PrintNumber( "Clock Type", "UNKNOWN: 0x%X", + ntohl(pData->clockType) ); + } // switch clockType + + // what follows the pData structure is one entity path + // print it out + uint8_t *l_ptr = reinterpret_cast<uint8_t *>(pData+1); + printEntityPath(l_ptr, i_parser, "Target"); + + break; // CLOCK_CALLOUT + } case HWAS::BUS_CALLOUT: { switch (ntohl(pData->busType)) @@ -144,6 +166,7 @@ case HWAS::_type: i_parser.PrintString( "GARD Error Type", #_type); break; break; // HW_CALLOUT } case HWAS::PROCEDURE_CALLOUT: + { i_parser.PrintString( "Callout type", "Procedure Callout"); switch (ntohl(pData->procedure)) { @@ -174,6 +197,7 @@ case HWAS::_type: i_parser.PrintString( "Procedure", #_type); break; break; } // switch procedure break; // PROCEDURE_CALLOUT + } default: i_parser.PrintNumber( "Callout type", "UNKNOWN: 0x%X", ntohl(pData->type) ); diff --git a/src/usr/errl/test/errltest.H b/src/usr/errl/test/errltest.H index 708c46084..3d8a247db 100644 --- a/src/usr/errl/test/errltest.H +++ b/src/usr/errl/test/errltest.H @@ -441,6 +441,11 @@ public: HWAS::EPUB_PRC_MEMORY_PLUGGING_ERROR, HWAS::SRCI_PRIORITY_HIGH); + errl->addClockCallout( + pExList[0], + HWAS::TODCLK_TYPE, + HWAS::SRCI_PRIORITY_MED); + if (pExList.size() > 1) { errl->addBusCallout( diff --git a/src/usr/errl/test/errluserdetailtest.H b/src/usr/errl/test/errluserdetailtest.H index 92b65578e..e3417861d 100644 --- a/src/usr/errl/test/errluserdetailtest.H +++ b/src/usr/errl/test/errluserdetailtest.H @@ -580,6 +580,12 @@ public: HWAS::EPUB_PRC_FSI_PATH, HWAS::SRCI_PRIORITY_HIGH).addToLog(errl); + ErrlUserDetailsCallout( + &ep, + ep_size, + HWAS::TODCLK_TYPE, + HWAS::SRCI_PRIORITY_LOW).addToLog(errl); + if (pExList.size() > 1) { TARGETING::EntityPath ep2; |

