From 7e9fe96afbbde2f4730b1cfa69c3526672227bdf Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Thu, 20 Feb 2020 09:37:46 -0600 Subject: [PATCH] PRD: Workarounds to avoid HIO during checkstops Change-Id: Ic05472b0806465fbf3315663da7c67349f72ebbc CQ: SW485981 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/92064 Tested-by: Jenkins Server Reviewed-by: Benjamen G Tyner Reviewed-by: Brian J Stegmiller Reviewed-by: Zane C Shelley Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/93123 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins --- .../framework/register/prdfErrorRegister.C | 7 +-- .../resolution/iipAnalyzeChipResolution.h | 7 ++- .../resolution/iipCallAttnResolution.h | 5 +- .../resolution/iipCallResolutionTemplate.h | 4 +- .../resolution/iipCaptureResolution.h | 5 +- .../framework/resolution/iipEregResolution.h | 7 ++- .../framework/resolution/iipResolution.C | 32 ++++++++----- .../framework/resolution/iipResolution.h | 6 ++- .../resolution/iipResolutionFactory.C | 5 +- .../resolution/iipResolutionFactory.h | 5 +- .../framework/resolution/iipResolutionList.h | 5 +- .../resolution/iipTerminateResolution.h | 6 ++- .../resolution/iipThresholdResolution.h | 7 ++- .../framework/resolution/prdDumpResolution.H | 8 +++- .../resolution/prdfAnalyzeConnected.H | 6 ++- .../resolution/prdfCalloutConnectedGard.H | 5 +- .../framework/resolution/prdfCalloutGard.H | 5 +- .../resolution/prdfCaptureResolution.C | 7 ++- .../resolution/prdfCaptureResolution.H | 8 +++- .../resolution/prdfClockResolution.C | 5 +- .../resolution/prdfClockResolution.H | 7 ++- .../resolution/prdfErrorTypeResolution.H | 6 +-- .../prdfIntervalThresholdResolution.H | 7 ++- .../resolution/prdfPluginCallResolution.H | 7 ++- .../resolution/prdfResetThresholdResolution.H | 6 ++- .../framework/resolution/prdfResolutionMap.C | 46 +++++++++---------- .../framework/resolution/prdfResolutionMap.H | 5 +- .../resolution/prdfThresholdResolutions.C | 10 ++-- .../resolution/prdfThresholdResolutions.H | 11 +++-- .../resolution/xspprdFlagResolution.C | 4 +- .../resolution/xspprdFlagResolution.h | 8 +++- .../resolution/xspprdTryResolution.h | 7 ++- .../service/iipServiceDataCollector.h | 10 +++- .../service/prdfServiceDataCollector.C | 33 +++++++++++-- .../common/framework/service/xspprdsdbug.C | 4 +- .../prdf/common/plat/prdfRasServices_common.C | 23 +++++++++- src/usr/diag/prdf/common/prdfMain_common.C | 13 ++++-- .../diag/prdf/common/rule/prdfRuleMetaData.C | 5 +- .../diag/prdf/framework/prdfDumpResolution.C | 5 +- 39 files changed, 241 insertions(+), 121 deletions(-) diff --git a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C index 450a7bc9cb7..0e20c9aaf2a 100755 --- a/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C +++ b/src/usr/diag/prdf/common/framework/register/prdfErrorRegister.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2019 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -248,10 +248,11 @@ int32_t ErrorRegister::Lookup(STEP_CODE_DATA_STRUCT & sdc, BitKey & bl) { int32_t rc = SUCCESS; ResolutionList rList; - rc = rMap.LookUp( rList,bl,sdc ); + bool isDefault = false; + rc = rMap.LookUp( rList,bl,sdc,isDefault ); for( ResolutionList::iterator i = rList.begin(); i != rList.end(); ++i ) { - rc |= (*i)->Resolve( sdc ); + rc |= (*i)->Resolve( sdc, isDefault ); } return rc; diff --git a/src/usr/diag/prdf/common/framework/resolution/iipAnalyzeChipResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipAnalyzeChipResolution.h index 54fecf9327c..156b47fc919 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipAnalyzeChipResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipAnalyzeChipResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1997,2014 */ +/* Contributors Listed Below - COPYRIGHT 1997,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -91,7 +93,8 @@ class AnalyzeChipResolution: public Resolution
Notes: {optional}
*/ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData, + bool i_default = false); private: // functions private: // Data diff --git a/src/usr/diag/prdf/common/framework/resolution/iipCallAttnResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipCallAttnResolution.h index 2010eb99135..480aa51c30a 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipCallAttnResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipCallAttnResolution.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -83,7 +83,8 @@ class CallAttnResolution : public Resolution // // End Function Specification **************************************** - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); // Function Specification ******************************************** // // Purpose: Resolve service data - callout all chips at attention as diff --git a/src/usr/diag/prdf/common/framework/resolution/iipCallResolutionTemplate.h b/src/usr/diag/prdf/common/framework/resolution/iipCallResolutionTemplate.h index 2b487c8b5a0..58e9e86c302 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipCallResolutionTemplate.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipCallResolutionTemplate.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -92,7 +92,7 @@ class CallResolutionTemplate : public Resolution // // End Function Specification **************************************** - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error) + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, bool i_default = false) { return((object->*pFunction)(error)); } diff --git a/src/usr/diag/prdf/common/framework/resolution/iipCaptureResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipCaptureResolution.h index d05f503f440..55c85327dc4 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipCaptureResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipCaptureResolution.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -100,7 +100,8 @@ class CaptureResolution : public Resolution @return returncode [SUCCESS | mop return code] @No definition exist for this until we prove we need it again! */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); private: // functions private: // Data diff --git a/src/usr/diag/prdf/common/framework/resolution/iipEregResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipEregResolution.h index 1f598ee4c54..bc64b698e01 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipEregResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipEregResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1996,2014 */ +/* Contributors Listed Below - COPYRIGHT 1996,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -93,7 +95,8 @@ class EregResolution : public Resolution // Copy ctor - compiler default is sufficient // Assignment - compiler default is sufficient - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data, + bool i_default = false); // Function Specification ******************************************** // // Purpose: diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C index 483573ffdc3..1acb54edf18 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -93,7 +93,8 @@ Resolution::~Resolution() {} // EregResolution Member Function Specifications //--------------------------------------------------------------------- -int32_t EregResolution::Resolve( STEP_CODE_DATA_STRUCT & io_data ) +int32_t EregResolution::Resolve( STEP_CODE_DATA_STRUCT & io_data, + bool i_default ) { int32_t rc = PRD_INTERNAL_CODE_ERROR; if( errorRegister != NULL ) @@ -106,7 +107,8 @@ int32_t EregResolution::Resolve( STEP_CODE_DATA_STRUCT & io_data ) //-------------------------------------------------------------------- // CalloutGardResolution Member Functions //-------------------------------------------------------------------- -int32_t CalloutGardResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t CalloutGardResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { /* This resolution is only needed when we callout self. So, during RuleChip @@ -125,7 +127,8 @@ int32_t CalloutGardResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) PRDcallout l_targetCallout( ServiceDataCollector::getTargetAnalyzed() ); io_serviceData.service_data->SetCallout( l_targetCallout, iv_calloutPriority, - iv_gardState ); + iv_gardState, + i_default ); } else { @@ -140,7 +143,8 @@ int32_t CalloutGardResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) // ResolutionList Member Functions //-------------------------------------------------------------------- -int32_t ResolutionList::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t ResolutionList::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { int32_t rc = SUCCESS; for(std::vector::iterator iter = resolutionList.begin(); @@ -157,7 +161,8 @@ int32_t ResolutionList::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) //-------------------------------------------------------------------- // Call all chips raising attention as reported by sp sysdebug area //-------------------------------------------------------------------- -int32_t CallAttnResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t CallAttnResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { int32_t rc = NO_DOMAINS_AT_ATTENTION; SYSTEM_DEBUG_CLASS systemDebug; @@ -176,7 +181,8 @@ int32_t CallAttnResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) // ******************************************************************** -int32_t TerminateResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t TerminateResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { io_serviceData.service_data->SetTerminate(); return(SUCCESS); @@ -184,7 +190,8 @@ int32_t TerminateResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) // ******************************************************************** -int32_t AnalyzeChipResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t AnalyzeChipResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { // mk442956 a return xChip.Analyze( io_serviceData, @@ -193,7 +200,8 @@ int32_t AnalyzeChipResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) // ******************************************************************** -int32_t TryResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t TryResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { // Save the current error signature ErrorSignature * es = io_serviceData.service_data->GetErrorSignature(); @@ -213,7 +221,8 @@ int32_t TryResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) //-------------------------------------------------------------------- // CalloutConnectedGard Member Functions //-------------------------------------------------------------------- -int32_t CalloutConnectedGard::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t CalloutConnectedGard::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { TargetHandle_t sourceTrgt = ServiceDataCollector::getTargetAnalyzed(); TargetHandle_t connTrgt = nullptr; @@ -268,7 +277,8 @@ int32_t CalloutConnectedGard::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) //-------------------------------------------------------------------- // AnalyzeConnected Member Functions //-------------------------------------------------------------------- -int32_t AnalyzeConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t AnalyzeConnected::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { TargetHandle_t sourceTrgt = ServiceDataCollector::getTargetAnalyzed(); TargetHandle_t connTrgt = nullptr; diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipResolution.h index f3fb31d2e43..866aeb8f59e 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -85,9 +85,11 @@ class Resolution /** * @brief Resolve the service data for this error syndrome * @param[io] io_data Reference to STEP_CODE_DATA_STRUCT + * @param[i] i_default * @return SUCCESS | non-zero */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data ) = 0; + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data, + bool i_default = false ) = 0; // Function Specification ******************************************** // // Purpose: Resolve service data for a specific error bit (Pure Virtual) diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C index dd5979efd8a..82b8856ccaa 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -128,7 +128,8 @@ Resolution & ResolutionFactory::LinkResolutions(Resolution & r1, // --------------------------------------------------------------------- int32_t ResolutionFactory::ResolutionLink::Resolve( - STEP_CODE_DATA_STRUCT & serviceData ) + STEP_CODE_DATA_STRUCT & serviceData, + bool i_default ) { int32_t rc = xlnk1->Resolve(serviceData); if (rc == SUCCESS) rc = xlnk2->Resolve(serviceData); diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h index 91f9a66b2b1..8bd9a0e9c64 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionFactory.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -351,7 +351,8 @@ class ResolutionFactory return xlnk1 >= r.xlnk1; }; - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData, + bool i_default = false); private: // data Resolution * xlnk1; Resolution * xlnk2; diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolutionList.h b/src/usr/diag/prdf/common/framework/resolution/iipResolutionList.h index bbda0573919..6f0eb3e6955 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolutionList.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolutionList.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -98,7 +98,8 @@ class ResolutionList : public Resolution // // End Function Specification **************************************** - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); // Function Specification ******************************************** // // Purpose: Resolve service data for a specific error bit (Pure Virtual) diff --git a/src/usr/diag/prdf/common/framework/resolution/iipTerminateResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipTerminateResolution.h index f10f10c5faf..8da3fc526ae 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipTerminateResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipTerminateResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1997,2014 */ +/* Contributors Listed Below - COPYRIGHT 1997,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -103,7 +105,7 @@ class TerminateResolution: public Resolution // // End Function Specification **************************************** - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data, bool i_default = false); // Function Specification ******************************************** // // Purpose: Tells the ServiceDataCollector (data) that machine operation diff --git a/src/usr/diag/prdf/common/framework/resolution/iipThresholdResolution.h b/src/usr/diag/prdf/common/framework/resolution/iipThresholdResolution.h index c558e8705db..8b5c1747ada 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipThresholdResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/iipThresholdResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1996,2014 */ +/* Contributors Listed Below - COPYRIGHT 1996,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -104,7 +106,8 @@ class ThresholdResolution : public Resolution // copy ctor - Compiler default ok // Assignment - Compiler default ok - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); // Function Specification ******************************************** // // Purpose: Resolve service data for a specific error bit diff --git a/src/usr/diag/prdf/common/framework/resolution/prdDumpResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdDumpResolution.H index 7915681746a..1150a1915d2 100644 --- a/src/usr/diag/prdf/common/framework/resolution/prdDumpResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdDumpResolution.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2001,2014 */ +/* Contributors Listed Below - COPYRIGHT 2001,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -86,9 +88,11 @@ public: /** * @brief updates the dump flag in service data collector * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @param[i] i_default Default resolution * @return Non-SUCCESS in internal function fails, SUCCESS otherwise. */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default = false ); /* * base class defines operator== so one is needed here diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H index 52dd4861fda..edaa55b1348 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfAnalyzeConnected.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -77,12 +77,14 @@ class AnalyzeConnected : public Resolution * @brief Determine chip object for current connected unit and call its * analyze func. * @param[io] io_service_data References to STEP_CODE_DATA_STRUCT + * @param[i] i_default Default resolution * @return SUCCESS | non-zero if chip not found. * @note if the call to getConnected yields NULL than the * altResolution is called. If the altResolution is NULL than the * source is added to the callout list. */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data, + bool i_default = false ); virtual bool operator==(const AnalyzeConnected & r) const { diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnectedGard.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnectedGard.H index 1adfcea2929..458c275c26b 100644 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnectedGard.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutConnectedGard.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* Contributors Listed Below - COPYRIGHT 2014,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -91,7 +91,8 @@ class CalloutConnectedGard : public Resolution * altResolution is called. If the altResolution is NULL than the * source is added to the callout list. */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_service_data, + bool i_default = false ); /** * @brief overloads operator == diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutGard.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutGard.H index 34b27650e70..04147ac64c0 100644 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutGard.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutGard.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -73,7 +73,8 @@ class CalloutGardResolution: public Resolution * @brief Executes the callout and enforces gard policy. * @param error step code data struct. */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); /** * @brief compares if two CalloutGardResolution are identical. diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C index f5b6ec2abe2..89a0b820fc8 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.C @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2006,2014 */ +/* Contributors Listed Below - COPYRIGHT 2006,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -27,7 +29,8 @@ namespace PRDF { -int32_t CaptureResolution::Resolve( STEP_CODE_DATA_STRUCT & io_error ) +int32_t CaptureResolution::Resolve( STEP_CODE_DATA_STRUCT & io_error, + bool i_default ) { ExtensibleChip * l_pResolutionChip = ServiceDataCollector::getChipAnalyzed( ); diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H index 8c84cb97531..942deebb9a6 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCaptureResolution.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2006,2014 */ +/* Contributors Listed Below - COPYRIGHT 2006,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -47,9 +49,11 @@ class CaptureResolution : public Resolution /** @brief Perform capture. * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @param[i] i_default Default resolution * @return SUCCESS| FAIL */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default = false ); /** * Comparison operator to aid in ResolutionFactory. diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C index 275fcce2fc3..c38981ce01c 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -45,7 +45,8 @@ using namespace PlatServices; //------------------------------------------------------------------------------ // Find the active clock source and blame it -int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData) +int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData, + bool i_default) { using namespace TARGETING; diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H index a5c0ca7c797..e1e9fc86f95 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2009,2014 */ +/* Contributors Listed Below - COPYRIGHT 2009,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -74,7 +76,8 @@ public: * @param[io] io_data Reference to STEP_CODE_DATA_STRUCT * @return Non-SUCCESS if an internal function fails, SUCCESS otherwise */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data, + bool i_default = false ); /* * base class defines operator== so one is needed here diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfErrorTypeResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfErrorTypeResolution.H index ba1c83db7ce..fc2a86d5673 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfErrorTypeResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfErrorTypeResolution.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -87,14 +87,14 @@ public: /** Resolve by adding the error type to the service data collector
    -
    Parameters: ServiceDataCollector +
    Parameters: ServiceDataCollector, i_default
    Returns: Return code [SUCCESS | nonZero]
    Requirements: none.
    Promises: sdc.GetErrorType() == ErrorType
    Exceptions: None.

*/ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & sdc); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & sdc, bool i_default = false); private: // functions private: // Data diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfIntervalThresholdResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfIntervalThresholdResolution.H index 38e213e5c4c..79bf4848d2c 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfIntervalThresholdResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfIntervalThresholdResolution.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2001,2014 */ +/* Contributors Listed Below - COPYRIGHT 2001,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -120,7 +122,8 @@ public: // copy ctor - Compiler default ok // Assignment - Compiler default ok - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); // Function Specification ******************************************** // // Purpose: Resolve service data for a specific error bit diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H index 424622bc332..e3982b66933 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfPluginCallResolution.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2005,2014 */ +/* Contributors Listed Below - COPYRIGHT 2005,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -54,7 +56,8 @@ class PluginCallResolution : public Resolution return (iv_function == r.iv_function); } - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error) + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error, + bool i_default = false) { // In Isolation only pass, we are only interested in error // signature. So we will not execute plugin resolution as it may diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfResetThresholdResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfResetThresholdResolution.H index 845f8e9e164..30c69e51eb0 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfResetThresholdResolution.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfResetThresholdResolution.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -94,6 +94,7 @@ public: /** Resolve this part of the error (increment count) @param error, Access to ServiceDataCollector @see ServiceDataCollector + @param i_default default resolution @returns [SUCCESS| return code] @pre none @post 1) ++count. @@ -101,7 +102,8 @@ public: maskId is sent to serviceDataCollector. 3)Chained resolution called if one was provided in ctor */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); private: // functions diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.C b/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.C index 3da0d9a6848..59ec1c78cff 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -251,11 +252,11 @@ void ResolutionMap::Add(const uint8_t *i_ble, int32_t ResolutionMap::LookUp( ResolutionList & o_list, BitKey & io_bitList, - STEP_CODE_DATA_STRUCT & scd ) + STEP_CODE_DATA_STRUCT & scd, + bool & o_default ) { - /* See note below + o_default = false; uint32_t lsize = o_list.size(); - */ int32_t l_rc = SUCCESS; if(iv_filter != NULL) @@ -298,30 +299,25 @@ int32_t ResolutionMap::LookUp( ResolutionList & o_list, } } - /* There are several cases in our filtering where we may get to a register - * and find nothing at attention. For example, the only active bit can't be - * blamed as the root cause of a checkstop. In this case, we don't want the - * default resolution. Otherwise, we will have erroneous callouts. I am - * going to leave this code here now, just in case, but eventually it should - * be removed once we have proved there are not adverse side effects. // we didn't find anything to add, so use default - if( lsize == o_list.size() ) + // if it is a primary pass and we haven't found any bit set, let us + // prevent default resolution from getting executed. It is primarily + // because end of primary pass doesn't necessarily mean end of analysis. + // There may be a case when a FIR has only a secondary bit on. In that + // case, primary pass shall fail to find any bit set and initiate + // secondary pass. In secondary pass, bits set shall be identified and + // associated resolution shall be executed. + + if ( lsize == o_list.size() && + CHECK_STOP == scd.service_data->getPrimaryAttnType() && + (!scd.service_data->isPrimaryPass() || + !scd.service_data->isSecondaryErrFound()) ) { - // if it is a primary pass and we haven't found any bit set, let us - // prevent default resolution from getting executed. It is primarily - // because end of primary pass doesn't necessarily mean end of analysis. - // There may be a case when a FIR has only a secondary bit on. In that - // case, primary pass shall fail to find any bit set and initiate - // secondary pass. In secondary pass, bits set shall be identified and - // associated resolution shall be executed. - - if ( !(scd.service_data->isPrimaryPass() && - scd.service_data->isSecondaryErrFound()) ) - { - o_list.push_back( defaultRes ); - } + o_default = true; + ResolutionFactory & resFac = ResolutionFactory::Access(); + Resolution & defRes = resFac.getCalloutGardResol( NULL, MRU_MED, GARD ); + o_list.push_back( &defRes ); } - */ if( iv_filter != NULL ) { diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.H b/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.H index 9e8b03a34c8..e811b5f8414 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfResolutionMap.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -187,11 +187,12 @@ public: * is stacked in this list. * @param io_bitList bit key under analysis. * @param scd reference to STEP_CODE_STRUCT + * @param o_default default resolution returned * @return PRD_SCAN_COMM_REGISTER_ZERO, if filter returns bitkey of zero * size, SUCCESS otherwise. */ int32_t LookUp( ResolutionList & o_list, BitKey & io_bitList, - STEP_CODE_DATA_STRUCT & scd ); + STEP_CODE_DATA_STRUCT & scd, bool & o_default ); /** * @brief Get the stored filter associated with this resolution map. diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.C b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.C index 35a224f03ae..f2b8bcb38c4 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.C +++ b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -82,7 +82,7 @@ const ThresholdResolution::ThresholdPolicy ThresholdResolution::cv_pllDefault // Member Function Specifications //--------------------------------------------------------------------- -int32_t MaskResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t MaskResolution::Resolve(STEP_CODE_DATA_STRUCT & error, bool i_default) { error.service_data->SetHits(1); error.service_data->SetThreshold(1); @@ -133,7 +133,8 @@ ThresholdResolution::ThresholdResolution( uint32_t maskId, //--------------------------------------------------------------------- -int32_t ThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t ThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default) { int32_t rc = SUCCESS; Timer curTime = error.service_data->GetTOE(); // get timestamp (Time Of Error) from SDC @@ -213,7 +214,8 @@ ThresholdSigResolution::ThresholdSigResolution() : //--------------------------------------------------------------------- -int32_t ThresholdSigResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t ThresholdSigResolution::Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default) { int32_t l_rc = SUCCESS; diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H index b6169915988..a28d8a79ad6 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfThresholdResolutions.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2003,2019 */ +/* Contributors Listed Below - COPYRIGHT 2003,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -76,7 +76,8 @@ class MaskResolution: public Resolution @return SUCCESS | non-zero @note Acts like Threshold Resolution with a threshold of one */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); virtual void ResetCount(); // wl01 @@ -160,7 +161,8 @@ class ThresholdResolution : public MaskResolution @return SUCCESS | non-zero @note In mfg mode the threshold is one */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); virtual void ResetCount(); // wl01 @@ -230,7 +232,8 @@ class ThresholdSigResolution: public Resolution * error count is over the policy limits, sets mask id and * AT_THRESHOLD flag and then resets the error count. */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); /** operator== * Compare two ThresholdSigResolutions by policies. diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.C b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.C index 26e6fa50fa7..71cdaf5e4cb 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -46,7 +46,7 @@ namespace PRDF // Member Function Specifications //--------------------------------------------------------------------- -int32_t FlagResolution::Resolve(STEP_CODE_DATA_STRUCT & error) +int32_t FlagResolution::Resolve(STEP_CODE_DATA_STRUCT & error, bool i_default) { uint32_t rc = SUCCESS; error.service_data->setFlag(xFlag); diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h index 0ae4c819849..204ba4b53e4 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdFlagResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2001,2014 */ +/* Contributors Listed Below - COPYRIGHT 2001,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -82,9 +84,11 @@ class FlagResolution : public Resolution /** * @brief sets a flag in service data collector * @param[io] io_serviceData Reference to STEP_CODE_DATA_STRUCT + * @param[i] i_default Default resolution * @return None */ - virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ); + virtual int32_t Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default = false ); /* * base class defines operator== so one is needed here diff --git a/src/usr/diag/prdf/common/framework/resolution/xspprdTryResolution.h b/src/usr/diag/prdf/common/framework/resolution/xspprdTryResolution.h index 235fe5317c9..a71e94804cb 100755 --- a/src/usr/diag/prdf/common/framework/resolution/xspprdTryResolution.h +++ b/src/usr/diag/prdf/common/framework/resolution/xspprdTryResolution.h @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 1998,2014 */ +/* Contributors Listed Below - COPYRIGHT 1998,2020 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -106,7 +108,8 @@ class TryResolution: public Resolution
Exceptions: None.
*/ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); + virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error, + bool i_default = false); private: // functions private: // Data diff --git a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h index e8cdb79a5dc..8f1215e48be 100755 --- a/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h +++ b/src/usr/diag/prdf/common/framework/service/iipServiceDataCollector.h @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2019 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -101,6 +101,7 @@ struct SdcCallout { PRDcallout callout; PRDpriority priority; GARD_POLICY gardState; + bool isDefault = false; //bool gard; SdcCallout() : @@ -111,6 +112,11 @@ struct SdcCallout { : callout(mru), priority(p), gardState( i_gardState ) {} + SdcCallout(PRDcallout & mru, PRDpriority p, GARD_POLICY i_gardState, + bool i_default ) + : callout(mru), priority(p), gardState( i_gardState ), isDefault(i_default) + {} + SdcCallout( TARGETING::TargetHandle_t i_calloutTgt, PRDpriority p, GARD_POLICY i_gardState ) : callout( i_calloutTgt ), priority( p ), gardState( i_gardState ) @@ -341,7 +347,7 @@ class ServiceDataCollector
*/ void SetCallout( PRDcallout mru, PRDpriority priority = MRU_MED, - GARD_POLICY i_gardState = GARD ); + GARD_POLICY i_gardState = GARD, bool i_default = false ); /** Add a change to the prd signature List diff --git a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C index 731102a2656..6e1a79069f8 100755 --- a/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C +++ b/src/usr/diag/prdf/common/framework/service/prdfServiceDataCollector.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2019 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -125,7 +125,8 @@ inline TARGETING::TargetHandle_t buffer_getTarget( const uint8_t *&ptr ) void ServiceDataCollector::SetCallout( PRDcallout mru, PRDpriority priority, - GARD_POLICY i_gardState ) + GARD_POLICY i_gardState, + bool i_default ) { bool found = false; @@ -140,9 +141,15 @@ void ServiceDataCollector::SetCallout( PRDcallout mru, } } + bool gardExists = false; for ( SDC_MRU_LIST::iterator i = xMruList.begin(); - i != xMruList.end() && found == false; ++i ) + i != xMruList.end() && found == false; ) { + if ( i->gardState != NO_GARD ) + { + gardExists = true; + } + if ( i->callout == mru ) { found = true; @@ -156,11 +163,27 @@ void ServiceDataCollector::SetCallout( PRDcallout mru, i->gardState = i_gardState; } } + + // The default gard callouts should only be used if there is no other gard coming from + // another callout. So if a new callout with a gard comes in after we already stored + // a default callout, we remove the default one in favor of the new callout. + if ( NO_GARD != i_gardState && !i_default && i->isDefault ) + { + // Remove the default callout in favor of a new callout + i = xMruList.erase(i); + } + else + { + ++i; + } + } - if ( found == false ) + // If this is the default callout and a gard callout already exists we + // don't want to add the default callout to the list. + if ( found == false && (!i_default || (i_default && !gardExists)) ) { - xMruList.push_back( SdcCallout(mru, priority, i_gardState) ); + xMruList.push_back( SdcCallout(mru, priority, i_gardState, i_default) ); } } diff --git a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C index 47ef6afb05a..d2c09bae1f2 100755 --- a/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C +++ b/src/usr/diag/prdf/common/framework/service/xspprdsdbug.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2019 */ +/* Contributors Listed Below - COPYRIGHT 2012,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -352,7 +352,7 @@ void SYSTEM_DEBUG_CLASS::CalloutThoseAtAttention( Util::hashString("ATTN_DATA"), cbs ); } - sdc->SetCallout(LEVEL2_SUPPORT, MRU_HIGH); + sdc->SetCallout(LEVEL2_SUPPORT, MRU_HIGH, NO_GARD); } // ------------------------------------------------------------------- diff --git a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C index 2742286b354..789817c9c7c 100755 --- a/src/usr/diag/prdf/common/plat/prdfRasServices_common.C +++ b/src/usr/diag/prdf/common/plat/prdfRasServices_common.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2019 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,6 +40,10 @@ #include +#if !defined(__HOSTBOOT_MODULE) && !defined(ESW_SIM_COMPILE) +#include // setRegNodeBootStatus +#endif + // For compression routines #define PRDF_COMPRESSBUFFER_COMPRESS_FUNCTIONS #include @@ -213,6 +217,23 @@ errlHndl_t ErrDataService::GenerateSrcPfa( ATTENTION_TYPE i_attnType, { sappHwNoGardReq = true; } + + if ( MACHINE_CHECK == i_attnType && it->isDefault ) + { + #if !defined(__HOSTBOOT_MODULE) && !defined(ESW_SIM_COMPILE) + TargetHandle_t trgt = thiscallout.getTarget(); + TargetHandle_t node = getConnectedParent( trgt, TYPE_NODE ); + + errlHndl_t errl = HWSV::HostSvc::setRegNodeBootStatus( node ); + if ( nullptr != errl ) + { + PRDF_ERR( PRDF_FUNC "Error from HWSV::HostSvc::" + "setRegNodeBootStatus(0x%08x)", getHuid(node) ); + PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT ); + continue; + } + #endif + } } } diff --git a/src/usr/diag/prdf/common/prdfMain_common.C b/src/usr/diag/prdf/common/prdfMain_common.C index 09cfe22121b..286d693c0dc 100755 --- a/src/usr/diag/prdf/common/prdfMain_common.C +++ b/src/usr/diag/prdf/common/prdfMain_common.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2019 */ +/* Contributors Listed Below - COPYRIGHT 2013,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -347,12 +347,15 @@ errlHndl_t main( ATTENTION_VALUE_TYPE i_priAttnType, { (serviceData.GetErrorSignature())->setErrCode( (uint16_t)analyzeRc ); - serviceData.SetCallout(SP_CODE); - serviceData.SetCallout( LEVEL2_SUPPORT, MRU_LOW ); + serviceData.SetCallout( SP_CODE, MRU_MED, NO_GARD ); + serviceData.SetCallout( LEVEL2_SUPPORT, MRU_LOW, NO_GARD ); serviceData.setServiceCall(); - // We don't want to gard unless we have a good + // We don't want to gard for non-checkstops unless we have a good // return code - serviceData.clearMruListGard(); + if ( CHECK_STOP != serviceData.getPrimaryAttnType() ) + { + serviceData.clearMruListGard(); + } } } diff --git a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C index f9f7d6f925c..a32d04d498b 100644 --- a/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C +++ b/src/usr/diag/prdf/common/rule/prdfRuleMetaData.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2018 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -805,7 +805,8 @@ Resolution * RuleMetaData::createActionClass( uint32_t i_action, class NullResolution : public Resolution { public: - int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data ) + int32_t Resolve( STEP_CODE_DATA_STRUCT & io_data, + bool i_default ) { return SUCCESS; }; }; diff --git a/src/usr/diag/prdf/framework/prdfDumpResolution.C b/src/usr/diag/prdf/framework/prdfDumpResolution.C index 3d4a8267e47..6d0f57fa079 100644 --- a/src/usr/diag/prdf/framework/prdfDumpResolution.C +++ b/src/usr/diag/prdf/framework/prdfDumpResolution.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2020 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,7 +38,8 @@ namespace PRDF { -int32_t DumpResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) +int32_t DumpResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData, + bool i_default ) { // Note: Dump is not supported on hostboot. return SUCCESS;