diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2012-11-15 10:40:06 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-11-16 22:03:16 -0600 |
commit | d33218560b7b2bf2ebc4b5a33fed8aa77b8793e6 (patch) | |
tree | 7fff02186430b3d6c87b1238311e217b9cf6e37c /src/usr/diag/prdf/framework/resolution | |
parent | 9342e9d7df794e5bcb352799a989d5a9f40e4ca0 (diff) | |
download | talos-hostboot-d33218560b7b2bf2ebc4b5a33fed8aa77b8793e6.tar.gz talos-hostboot-d33218560b7b2bf2ebc4b5a33fed8aa77b8793e6.zip |
Merged common FSP and HB PRD code to prdf/common/
Change-Id: Iac94c3690598b7263de230934b911bb4ced34557
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2350
Tested-by: Jenkins Server
Reviewed-by: Bradley W. Bishop <bradleyb@us.ibm.com>
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2368
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/framework/resolution')
40 files changed, 0 insertions, 6251 deletions
diff --git a/src/usr/diag/prdf/framework/resolution/iipAnalyzeChipResolution.h b/src/usr/diag/prdf/framework/resolution/iipAnalyzeChipResolution.h deleted file mode 100755 index bc918e1f5..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipAnalyzeChipResolution.h +++ /dev/null @@ -1,112 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipAnalyzeChipResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1997,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 iipAnalyzeChipResolution_h -#define iipAnalyzeChipResolution_h - -// Class Description ************************************************* -// -// Name: AnalyzeChipResolution -// Base class: Resolution -// -// Description: Resolution to call Analyze() on a CHIP_CLASS -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class CHIP_CLASS; - -/** - <One line Class description> - @author Doug Gilbert - */ -class AnalyzeChipResolution: public Resolution -{ -public: - /** - Constructor - <ul> - <br><b>Parameters:</b> chip: Chip object - <br><b>Requirements:</b> None - <br><b>Promises:</b> Object created - <br><b>Exceptions:</b> None - </ul><br> - */ - AnalyzeChipResolution(CHIP_CLASS & chip) : xChip(chip) {} - - /* - Destructor - <ul> - <br><b>Parameters:</b> None. - <br><b>Returns:</b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises:</b> None. - <br><b>Exceptions:</b> None. - <br><b>Notes:</b> Compiler default is sufficient - </ul><br> - */ - // ~iipAnalyzeChipResolution(); - - /** - Resolve service data by calling chip.Analyze() - <ul> - <br><b>Parameters:</b> {parms} - <br><b>Returns:</b> {return} - <br><b>Requirements:</b> {preconditions} - <br><b>Promises:</b> {postconditions} - <br><b>Exceptions:</b> None. - <br><b>Notes:</b> {optional} - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData); - -private: // functions -private: // Data - - /** - @see CHIP_CLASS - */ - CHIP_CLASS & xChip; - -}; - - -#endif /* iipAnalyzeChipResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// 05/05/98 DRG Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipCallAttnResolution.h b/src/usr/diag/prdf/framework/resolution/iipCallAttnResolution.h deleted file mode 100755 index 1501edf82..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCallAttnResolution.h +++ /dev/null @@ -1,117 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCallAttnResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1997,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 iipCallAttnResolution_h -#define iipCallAttnResolution_h - -// Class Description ************************************************* -// -// Name: CallAttnResolution -// Base class: Resolution -// -// Description: A resolution to call all chips raising attention -// Usage: See iipResolution.h -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -//class CalloutMap; - -class CallAttnResolution : public Resolution -{ -public: -// CallAttnResolution(CalloutMap & callmap); - CallAttnResolution() {} - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: Object that maps chipId's to Callouts - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - - // ~CallAttnResolution(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default defn is sufficent - // - // End Function Specification **************************************** - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - // Function Specification ******************************************** - // - // Purpose: Resolve service data - callout all chips at attention as - // reported by the service processor sysdebug area. - // Parameters: Reference to the Step code data structure - // Returns: return code - // Requirements: None - // Promises: if rc = SUCCESS then - // ServiceData signature set, Callout list modified - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** -private: // functions -private: // Data - -// CalloutMap & calloutMap; - -}; - -//inline -//CallAttnResolution::CallAttnResolution(CalloutMap & callmap) -//: calloutMap(callmap) -//{ -//} - -#endif /* iipCallAttnResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// DRG Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipCallResolutionTemplate.h b/src/usr/diag/prdf/framework/resolution/iipCallResolutionTemplate.h deleted file mode 100755 index f63905caf..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCallResolutionTemplate.h +++ /dev/null @@ -1,115 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCallResolutionTemplate.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipCallResolutionTemplate_h -#define iipCallResolutionTemplate_h - -// Class Description ************************************************* -// -// Name: CallResolutionTemplate -// Base class: Resolution -// -// Description: Call a specified member function on object of type class T -// function signature: int32_t functname(STEP_CODE_DATA_STRUCT & error); -// Usage: -// -// CallResolutionTemplate<SixDamain> rd(&SixDomain,&SixDomain::Analyze); -// ResolutionMap rm(...); -// rm.Add(BIT_LIST_STRING_16,rd); -// -// Resolution &r = rm.LookUp(BIT_LIST_CLASS(BIT_LIST_STRING_16)); -// r->Resolve(error); // calls SixDomain::Analyze(error); -// -// End Class Description ********************************************* -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#ifndef iipResolution_h -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -template<class T> -class CallResolutionTemplate : public Resolution -{ -public: - typedef int32_t (T::*FUNCT) (STEP_CODE_DATA_STRUCT &); - - CallResolutionTemplate(T *obj, FUNCT pf) - : Resolution(),object(obj),pFunction(pf) {} - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: None - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - - //~CallResolutionTemplate(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is sufficent - // - // End Function Specification **************************************** - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error) - { - return((object->*pFunction)(error)); - } - // See Resolution.h - -private: // functions - CallResolutionTemplate(const CallResolutionTemplate<T>&); // not allowed - CallResolutionTemplate<T>& operator=(const CallResolutionTemplate<T>&); -private: // Data - - T * object; - FUNCT pFunction; - -}; - - -#endif /* iipCallResolutionTemplate_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// DRG Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipCallout.h b/src/usr/diag/prdf/framework/resolution/iipCallout.h deleted file mode 100755 index a0baa743e..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCallout.h +++ /dev/null @@ -1,167 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCallout.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipCallout_h -#define iipCallout_h - -// Special maintenance notes: ***************************************** -// -// This file must maintain the basic format decribed below. All -// maintenance must preserve that format to ensure the proper function -// of all code that uses this file. -// -// PRD_NULL_MRU must be the first mru in the MruCallout enum and it -// must have a value of zero. The value "PRD_NULL_MRU" shall be by -// definition a valid MRU value that means "No specific MRU". Mapping -// code will verify that all MRU values are greater than this value to -// acceptable for translation. -// -// The MruCallout enum must have the name "PRD_MAXMRUNUM" as the last -// mru in the list. This will then automatically supply the number of -// mrus in the enum to code that must check that. -// -// The MruCallout enum must default to compiler supplied values for each -// mru. This is how "PRD_NULL_MRU" and "PRD_MAXMRUNUM" will always be -// correct and it precludes any dependencies on other code modules -// requiring a specific value. -// -// PRD_NULL_FRU must be the first fru in the FruValues enum and it -// must have a value of zero. -// -// PRD_NULL_REFCODE must be the first refcode in the RefcodeValues enum -// and it must have a value of zero. -// -// NOTE!!!!!!! -// The Version, Release, Modification and Level values set in this file -// MUST be updated each time a change is made to this file that would -// cause the renumbering of the MRU callout values in the ENUM. -// -// End of Special maintenance notes. ********************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -//-------------------------------------------------------------------- -// Constants -//-------------------------------------------------------------------- - -#ifdef RS6000 -#ifndef SERVGENSIMCONTROLS_H -#include <ServGenSimControls.h> -#endif -#endif - -#ifdef __CPLUSPLUS -const PRD_CALLOUT_VERSION = 4; -#else -#define PRD_CALLOUT_VERSION 4 -#endif - -#ifdef __CPLUSPLUS -const PRD_CALLOUT_RELEASE = 3; -#else -#define PRD_CALLOUT_RELEASE 3 -#endif - -#ifdef __CPLUSPLUS -const PRD_CALLOUT_MODIFICATION = 0; -#else -#define PRD_CALLOUT_MODIFICATION 0 -#endif - -#ifdef __CPLUSPLUS -const PRD_CALLOUT_LEVEL = 4; -#else -#define PRD_CALLOUT_LEVEL 4 -#endif - - -#ifdef __CPLUSPLUS -const PRD_REFDIM = 5; -#else -#define PRD_REFDIM 5 -#endif - /* This is the number of refcodes and*/ - /* FRUs that a MRU list can be */ - /* translated into. */ - -#ifdef __CPLUSPLUS -const PRD_MRU_LIST_LIMIT = 24; -#else -#define PRD_MRU_LIST_LIMIT 24 -#endif - /* This is the maximum number of MRUs*/ - /* that will be allowed to be called */ - /* out for mapping. */ - -#ifdef __CPLUSPLUS -const PRD_FRU_AND_RC_LIMIT = 12; -#else -#define PRD_FRU_AND_RC_LIMIT 12 -#endif - /* this is the maximum number of FRUs*/ - /* and refcodes that will be allowed */ - /* in the mapping results. */ - - -/*--------------------------------------------------------------------*/ -/* User Types */ -/*--------------------------------------------------------------------*/ - -//#define MruCalloutDCL UINT16 /* How big a mru is in bits. */ - - -typedef enum { - - PRD_NULL_MRU, /* Do NOT use this. This is an */ - /* MRU used to mark the low end */ - /* of the valid MRU number ranges.*/ - - - - -/*********************************************************/ -/* Last, the reserved, default value of this */ -/* "NO_MRU" reserved mru name. */ -/* Use this only if there is no Callout and No service */ -/* action and the SRC will not get displayed. This MRU */ -/* will be mapped to the ServiceProcessor code refcode */ -/* so that if the SRC from this MRU ever ends up in the */ -/* panel or a log SP code will be called. */ -/* This MRU is used for attentions that do not require */ -/* service actions, such as "scrub complete". */ - - NO_MRU, - -/************************************************************/ -/* This is the reserved and Last mru and must remain that */ -/* way for proper code function. */ - LAST_MRU, - PRD_MAXMRUNUM = 0x7FFFFFFF} MruCallout; - - - - -#endif /* iipCallout_h */ - diff --git a/src/usr/diag/prdf/framework/resolution/iipCalloutMap.h b/src/usr/diag/prdf/framework/resolution/iipCalloutMap.h deleted file mode 100755 index 28f9fbc77..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCalloutMap.h +++ /dev/null @@ -1,152 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCalloutMap.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipCalloutMap_h -#define iipCalloutMap_h - -// Class Description ************************************************* -// -// Name: iipCalloutMap -// Base class: -// -// Description: Map ChipiD's to Mru callouts -// Usage: -// -// CalloutMap calloutMap(); -// -// foo(CalloutMap & calloutMap, CHIP_CLASS * chip) -// { -// uint32_t chip_id = chip->GetId(); -// MruCallout m1 = calloutMap.GetCallout(chip_id,HIGH); -// } -// -// End Class Description ********************************************* -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#if !defined(PRDF_TYPES_H) - #include <prdf_types.h> -#endif - -#include <prdfCallouts.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -/** - Convert a chipid to a mru callout - @author Douglas R. Gilbert - @version V4R5 -*/ -class CalloutMap -{ -public: - - enum probability { HIGH_PROBABILITY, LOW_PROBABILITY }; - - /** - CTOR - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> None - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None. - </ul><br> - */ - CalloutMap(); - - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is sufficient - // - // End Function Specification **************************************** - // ~iipCalloutMap(); - - - /** - Return a MruCallout for a chipId (Apache/Northstar) - <ul> - <br><b>Parameters: </b> chipId, probability - <br><b>Returns: </b> MruCallout - <br><b>Requirements:</b> Valid chipId - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Implemented for Apache and Northstar only - </ul><br> - */ - //MruCallout GetCallout(uint32_t chipId, probability prb = HIGH_PROBABILITY) const; - - /** - Get a MruValues for a chipId (Condor/CSP) - <ul> - <br><b>Parameters: </b> ChipId - <br><b>Returns: </b> MruValues (see xspiiCallout.h) - <br><b>Requirements:</b> Valid chipId - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Implemented for Condor and CSP only - </ul><br> - */ - PRDF::MruValues GetMruCallout(uint32_t chipId) const; - - /** - Get a MruValues for a chipId (Regatta/CSP) - <ul> - <br><b>Parameters: </b> ChipEnum - <br><b>Returns: </b> MruValues (see xspiiCallout.h) - <br><b>Requirements:</b> Valid chipEnum - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Implemented for Regatta and CSP only - </ul><br> - */ - PRDF::MruValues GetMruCallout(ChipEnum chipEnum) const; - -private: // functions -private: // Data - -}; - - -#endif /* iipCalloutMap_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// d24758.1 v4r1 05/20/96 DRG Initial Creation -// D49127.7 V4R1 09/27/96 DRG Made data static -// D49274.1 V4R5 06/08/98 DRG MOdify to support v4r5 -// D49420.x v5r2 07/17/00 mak modify to support v5r2 -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipCalloutResolution.h b/src/usr/diag/prdf/framework/resolution/iipCalloutResolution.h deleted file mode 100755 index 6f373ec5c..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCalloutResolution.h +++ /dev/null @@ -1,153 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCalloutResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1998,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 iipCalloutResolution_h -#define iipCalloutResolution_h - -// Class Description ************************************************* -// -// Name: CalloutResolution -// Base class: Resolution -// -// Description: Resolution makes a MRU Callout. -// -// Usage: -// -// -// CalloutResolution r1(PU0,MRU_MED); -// ResolutionMap rm(....) // see iipResolutionMap.h -// rm.Add(BIT_LIST_STRING_31,&r1); // if bit 31 is on callout PU0 HIGH as -// // the failing item -// -// ... -// -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#include <prdfCallouts.H> - -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -/** - A resolution that adds a MRU callout to the service data collector - @version V4R5 - @author Douglas R. Gilbert -*/ - -class CalloutResolution: public Resolution -{ -public: - - /** - CTOR - <ul> - <br><b>Parameters: </b> a MruValues, a PriorityValues (see xspiiCallout.h) - <br><b>Returns: </b> None. - <br><b>Requirements:</b> None. - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None. - </ul><br> - */ - CalloutResolution(PRDF::PRDcallout callout, PRDF::PRDpriority priority); - CalloutResolution(void); // default - CalloutResolution(const CalloutResolution & cr); - - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is sufficient - // - // End Function Specification **************************************** - //~CalloutResolution(); - - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - // dg00 start - virtual bool operator==(const Resolution & r) const - { - return r.operator==(*this); // compare whatever r is with this - } - - virtual bool operator==(const CalloutResolution & r) const - { - return((xMruCallout == r.xMruCallout) && (xPriority == r.xPriority)); - } - -// friend int operator==(const CalloutResolution& a, const CalloutResolution& b) -// { -// return((a.xMruCallout == b.xMruCallout) && (a.xPriority == b.xPriority)); -// } - // dg00 end - -private: // functions -private: // Data - - PRDF::PRDcallout xMruCallout; - PRDF::PRDpriority xPriority; - -}; - - -inline -CalloutResolution::CalloutResolution(PRDF::PRDcallout callout, - PRDF::PRDpriority priority) -: xMruCallout(callout), xPriority(priority) -{} - -inline -CalloutResolution::CalloutResolution() : - xMruCallout(NULL), xPriority(PRDF::MRU_MED) -{} - -inline -CalloutResolution::CalloutResolution(const CalloutResolution & cr) -: xMruCallout(cr.xMruCallout), xPriority(cr.xPriority) -{} - -#endif /* iipCalloutResolution_h */ diff --git a/src/usr/diag/prdf/framework/resolution/iipCaptureResolution.h b/src/usr/diag/prdf/framework/resolution/iipCaptureResolution.h deleted file mode 100755 index 3ce055018..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipCaptureResolution.h +++ /dev/null @@ -1,138 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipCaptureResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipCaptureResolution_h -#define iipCaptureResolution_h - -/** - @file iipCaptureResolution.h - @brief CaptureResolution class definition -*/ - -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#if !defined(iipCaptureData_h) -#include <iipCaptureData.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class SCAN_COMM_REGISTER_CLASS; - -/** - CaptureResolution captures the data from a scan comm register. - @code - // see xspmopenum.h for defn of chipIds - class SomeChipClass { - public: - CaptureResolution iv_captureScr; - CalloutResolution calloutSomething; - ResolutionMap someResolutionMap; - // .... - }; - - // in SomeChipClass.C - const int8_t SCR_ID = 0x01; - - SomeChipClass::SomeChipClass(...) - : iv_captureScr(SPIN0_ENUM, SCR_ID, someScr), - calloutComething(...), - someResolutionMap(...) - { - // .... - someResolutionMap.Add(BIT_LIST_STRING_10, &calloutSomething, &iv_captureScr); - // ... - } - @endcode - @see iipResolutionMap.h -*/ -class CaptureResolution : public Resolution -{ -public: - - /** - Constructor - @param chipId id of the chip - see xspmopenum.h - @param scrRegId developer defined 8bit id for this register - @param scr reference to ScanCommRegister - @param p placement of capturedatat (FRONT or BACK) see iipCaptureData.h - @see iipCaptureData.h - */ - CaptureResolution(uint32_t chipId, - uint8_t scrRegId, - SCAN_COMM_REGISTER_CLASS & scr, - CaptureData::Place p = CaptureData::BACK); - - // compiler default destructor is sufficient - /** - Resolve - perform the capture - @pre none - @post CaptureData sent to ServiceDataCollector - @return error - ServiceDataCollector - @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); - - private: // functions - private: // Data - - uint32_t chid; - SCAN_COMM_REGISTER_CLASS & xScr; - CaptureData::Place pos; // FRONT || BACK - uint8_t scrId; - -}; - -inline -CaptureResolution::CaptureResolution(uint32_t chipId, - uint8_t scrRegId, - SCAN_COMM_REGISTER_CLASS & scr, - CaptureData::Place p = CaptureData::BACK); -: -Resolution(), -chid(chipId), -scrId(scrRegId), -xScr(scr), -pos(p) -{} - - -#endif /* iipCaptureResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------ -------- ----- ------------------------------- -// d24758.1 v4r1m0 05/14/96 DRG Initial Creation -// d24758.1 v4r1m0 05/28/96 DRG Added new constructor for single scr -// d24758.1 v4r1m0 05/30/96 DRG Changed base class to Resolution -// Now only capture 1 reg/CaputureResolution -// d48127.9 v4r1m0 10/20/97 DRG Add interface for chipId + Address -// dg01 V4r3m0 05/13/99 DRG Add place to capture (FRONT or BACK) -// 359182 fips1 03/07/02 dgilbert fix up for FSP -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipEregResolution.h b/src/usr/diag/prdf/framework/resolution/iipEregResolution.h deleted file mode 100755 index 5aa3d31db..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipEregResolution.h +++ /dev/null @@ -1,132 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipEregResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipEregResolution_h -#define iipEregResolution_h - -// Class Description ************************************************* -// -// Name: EregResolution concrete class -// Base class: Resolution -// -// Description: Resolve an error by analyzing an error register -// Usage: -// -// ResolutionMap ereg1Resolutions(...); -// ErrorRegister ereg1(....); -// ErrorRegister ereg2(....); -// -// Resolution *r = new EregResolution(ereg2); -// ereg1Resolutions.add(BIT_LIST_STRING_20,r); // If bit 20 of ereg1 on then -// // Resolution = ereg2.Analyze(); -// -// -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class ErrorRegisterType; - -class EregResolution : public Resolution -{ - public: - EregResolution(); - EregResolution(ErrorRegisterType & er); - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: ErrorRegister object to be invoked by Resolve() - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - - // ~EregResolution(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is sufficient - // - // End Function Specification **************************************** - // Copy ctor - compiler default is sufficient - // Assignment - compiler default is sufficient - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); - // Function Specification ******************************************** - // - // Purpose: - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is sufficient - // - // End Function Specification **************************************** - - private: // functions - private: // Data - - ErrorRegisterType * errorRegister; - -}; - -inline -EregResolution::EregResolution(ErrorRegisterType &er) -: errorRegister(&er) {} - -inline -EregResolution::EregResolution() - : errorRegister(NULL) {} - -#endif /* iipEregResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- ------- ---- -------- -------- ------------------------------- -// v4r1m0 05/13/96 DRG Initial Creation -// pw01 494911 f310 03/04/05 iawillia Use ErrorRegisterType instead of -// ErrorRegister. -// f522283 fips300 09/27/05 dgilbert Make class FlyWeight -able -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipResolution.C b/src/usr/diag/prdf/framework/resolution/iipResolution.C deleted file mode 100755 index c1cb0be6b..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolution.C +++ /dev/null @@ -1,357 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 */ - -// Module Description ************************************************** -// -// Description: PRD resolution definition -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define iipResolution_C - -#include <iipconst.h> -#include <CcAutoDeletePointer.h> -#include <iipSystem.h> -#include <iipglobl.h> -//#include <iipCalloutMap.h> -#include <iipCalloutResolution.h> -#include <iipstep.h> -#include <iipScanCommRegisterChip.h> -#include <iipCaptureData.h> -#include <iipServiceDataCollector.h> -#include <iipErrorRegister.h> -#include <iipEregResolution.h> -#include <iipsdbug.h> -#include <iipResolutionList.h> -//#include <iipThresholdResolution.h> -#include <iipCallAttnResolution.h> -#include <iipTerminateResolution.h> -#include <iipAnalyzeChipResolution.h> -#include <xspprdTryResolution.h> -//#include <prdfResetThresholdResolution.H> -//#include <prdfIntervalThresholdResolution.H> -#include <iipchip.h> -#include <prdfCalloutConnected.H> -#include <prdfAnalyzeConnected.H> -#include <prdfPlatServices.H> - -#undef iipResolution_C - -using namespace PRDF; - -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Global Variables -//---------------------------------------------------------------------- - -//--------------------------------------------------------------------- -// Resolution Member Function Specifications -//--------------------------------------------------------------------- -Resolution::~Resolution() {} - -//--------------------------------------------------------------------- -// EregResolution Member Function Specifications -//--------------------------------------------------------------------- - -int32_t EregResolution::Resolve(STEP_CODE_DATA_STRUCT & data) -{ - int32_t rc = PRD_INTERNAL_CODE_ERROR; - if(errorRegister != NULL) - { - rc = errorRegister->Analyze(data); - } - return rc; -} - - -//--------------------------------------------------------------------- -// CalloutResolution Member Function Specifications -// using MruValues (xspiiCallout.h) -//--------------------------------------------------------------------- - -int32_t CalloutResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - error.service_data->SetCallout(xMruCallout,xPriority); - return(SUCCESS); -} - -//-------------------------------------------------------------------- -// ResolutionList Member Functions -//-------------------------------------------------------------------- - -int32_t ResolutionList::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - int32_t rc = SUCCESS; - for(std::vector<void *>::iterator iter = resolutionList.begin(); - iter != resolutionList.end(); - ++iter) - { - Resolution * r = (Resolution *) *iter; - rc = r->Resolve(error); - if(rc != SUCCESS) break; - } - return(rc); -} - -//-------------------------------------------------------------------- -// ThresholdResolution Member Functions -//-------------------------------------------------------------------- - -//int32_t ThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -//{ -// ++count; -// error.service_data->SetHits((uint16_t)count); -// error.service_data->SetThreshold((uint16_t)threshold); -// if((count >= threshold) || (error.service_data->IsFlooding())) -// { -// error.service_data->SetThresholdMaskId(maskId); // threshold, degraded YES -// } -// int32_t rc = SUCCESS; -// if(xRes != NULL) rc = xRes->Resolve(error); -// return rc; -//} - -//-------------------------------------------------------------------- -// Call all chips raising attention as reported by sp sysdebug area -//-------------------------------------------------------------------- -int32_t CallAttnResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - int32_t rc = NO_DOMAINS_AT_ATTENTION; - SYSTEM_DEBUG_CLASS systemDebug; - - ErrorSignature * signature = error.service_data->GetErrorSignature(); - signature->clear(); - signature->setChipId(0xffffffff); - - systemDebug.CalloutThoseAtAttention(error); - - signature->setErrCode((uint16_t)NO_PRD_ANALYSIS); - - return(rc); -} - -// ******************************************************************** - -int32_t TerminateResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - error.service_data->SetTerminate(); - return(SUCCESS); -} - -// ******************************************************************** - -int32_t AnalyzeChipResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - // mk442956 a - return xChip.Analyze(error,error.service_data->GetCauseAttentionType()); -} - -// ******************************************************************** - -int32_t TryResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - // Save the current error signature - ErrorSignature * es = error.service_data->GetErrorSignature(); - ErrorSignature temp = *es; - // Try the tryResolution - int32_t rc = xTryResolution->Resolve(error); - if ( (SUCCESS != rc) && (PRD_NO_CLEAR_FIR_BITS != rc) ) // if it didn't work - { - // Restore signature - *es = temp; - // Call the default signature - rc = xDefaultResolution->Resolve(error); - } - return rc; -} - -int32_t prdfCalloutConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) -{ - using namespace TARGETING; - - TargetHandle_t l_pconnectedTarget = NULL; - TargetHandleList l_connectedTargetList; - l_connectedTargetList = PlatServices::getConnected( iv_psourceHandle, - iv_targetType ); - if(0xffffffff == iv_idx) - { - if(l_connectedTargetList.size()>0) - { - l_pconnectedTarget = l_connectedTargetList[0]; - } - } - else - { - for(TargetHandleList::iterator itrTarget = l_connectedTargetList.begin(); - itrTarget!= l_connectedTargetList.end();itrTarget++) - { - if(iv_idx == PlatServices::getTargetPosition(*itrTarget)) - { - l_pconnectedTarget = *itrTarget ; - break; - } - } - } - - if ( l_pconnectedTarget != NULL ) - { - serviceData.service_data->SetCallout(l_pconnectedTarget,iv_priority); - } - else - { - if(iv_altResolution != NULL) - { - iv_altResolution->Resolve(serviceData); - } - else - { - serviceData.service_data->SetCallout(iv_psourceHandle); - } - } - - return SUCCESS; -} - -//-------------------------------------------------------------------- -// AnalyzeConnected Member Functions -//-------------------------------------------------------------------- -int32_t PrdfAnalyzeConnected::Resolve(STEP_CODE_DATA_STRUCT & serviceData) -{ - using namespace TARGETING; - using namespace PRDF; - - CHIP_CLASS * l_connChipObj = NULL; - TARGETING::TargetHandle_t l_pconnChipTarget = NULL; - - // Get connected list. - TargetHandleList l_connectedTargetList = PlatServices::getConnected( - iv_psourceHandle, - iv_targetType ); - - // If ID = 0xffffffff, find first valid. - if (0xffffffff == iv_idx) - { - if(l_connectedTargetList.size()>0) - { - //First valid handle. we don't allow invalid things in list - l_pconnChipTarget = l_connectedTargetList[0] ; - } - } - // Otherwise, grab from correct index. - else - { - for(TargetHandleList::iterator itrTarget = l_connectedTargetList.begin(); - itrTarget!= l_connectedTargetList.end();itrTarget++) - { - if(iv_idx == PlatServices::getTargetPosition(*itrTarget)) - { - l_pconnChipTarget = *itrTarget ; - break; - - } - } - } - - // If valid chip found, look up in global system container. - if (NULL != l_pconnChipTarget) - { - l_connChipObj = systemPtr->GetChip(l_pconnChipTarget); - } - - // Analyze chip. - if (NULL != l_connChipObj) - return l_connChipObj->Analyze( serviceData, - serviceData.service_data->GetCauseAttentionType() ); - else - return PRD_UNRESOLVED_CHIP_CONNECTION; -} - -//-------------------------------------------------------------------- -// ResetThresholdResolution Member Functions -//-------------------------------------------------------------------- - -#if defined(_OBSOLITE_) -int32_t ResetThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - ++count; - error.service_data->SetHits((uint16_t)count); - error.service_data->SetThreshold((uint16_t)threshold); - if((count == threshold) || (error.service_data->IsFlooding())) - { - error.service_data->SetThresholdMaskId(maskId); // threshold, degraded YES - count = 0; // Reset the counter when threshold is hit - } - int32_t rc = SUCCESS; - // if(xRes != NULL) rc = xRes->Resolve(error); - return rc; -} -//-------------------------------------------------------------------- -// IntervalThresholdResolution Member Functions -//-------------------------------------------------------------------- - -int32_t IntervalThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - PrdTimer curTime = error.service_data->GetTOE(); // get timestamp (Time Of Error) from SDC; - ++count; - if (count == 1) // The interval begins now at the first occurrence - intervalEndTime = curTime + intervalLength; // Project the end of interval (intervalLength is in seconds) - else - { - if (curTime > intervalEndTime) // See if we're already past the time window - { - count = 1; // Reset count as if it were the first - intervalEndTime = curTime + intervalLength; // Project the new end of interval (intervalLength is in seconds) - } - else if((count == threshold) || (error.service_data->IsFlooding())) // We've hit threshold within the interval - { - error.service_data->SetThresholdMaskId(maskId); // threshold, degraded YES - count = 0; // Reset the counter when threshold is hit - } - else ; // Nothing else--the count is already incremented - } - error.service_data->SetHits((uint16_t)count); - error.service_data->SetThreshold((uint16_t)threshold); - - int32_t rc = SUCCESS; - // if(xRes != NULL) rc = xRes->Resolve(error); - return rc; -} -#endif diff --git a/src/usr/diag/prdf/framework/resolution/iipResolution.h b/src/usr/diag/prdf/framework/resolution/iipResolution.h deleted file mode 100755 index 4211d563b..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolution.h +++ /dev/null @@ -1,161 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipResolution_h -#define iipResolution_h - -// Class Description ************************************************* -// -// Name: Resolution -// Base class: None -// -// Description: This module contains the Processor Runtime -// Diagnostics Resolution class declaration. -// Resolution provides a mechansim to resolve a -// hardware error and provide service data -// -// Usage: Abstract base class -// -// int32_t foo(STEP_CODE_DATA_STRUCT &serviceData, -// ResolutionMap &map) -// { -// Resolution &r = map.LookUp(BIT_LIST_STRING_21); -// int32_t rc = r.Resolve(serviceData); -// return(rc); -// } -// -// End Class Description ********************************************* -/*--------------------------------------------------------------------*/ -/* Reference the virtual function tables and inline function - defintions in another translation unit. */ -/*--------------------------------------------------------------------*/ - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#if !defined(PRDF_TYPES_H) -#include <prdf_types.h> -#endif - -#if !defined(IIPSTEP_H) -#include <iipstep.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class CalloutResolution; //dg00 - - -class Resolution -{ -public: - - /** - Destructor - @pre None - @post None - @note This destructor does nothing. This definitions - would have the same effect as the compiler generated - default destructor. It is declared virtual so that - derived classes will be destructed properly. - */ - virtual ~Resolution(); - - /** - Resolve the service data for this error syndrome - @pre None - @post service data is complete - @return SUCCESS | non-zero - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data) = 0; - // Function Specification ******************************************** - // - // Purpose: Resolve service data for a specific error bit (Pure Virtual) - // Parameters: Reference to the Step code data structure - // Returns: return code - // Requirements: None - // Promises: if rc = SUCCESS then data filled with apropriate service data - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** - - - // Copy ctor - compiler default is sufficient - // Assignment - compiler default is sufficient - - // dg00 start - /** - Comparison - <ul> - <br><b>Parameters: </b> A Resolution - <br><b>Returns: </b> [true | false] - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Each derived class that supports comparison must be listed - here. - </ul><br> - */ - virtual bool operator==(const Resolution & r) const - { return false; } // default - virtual bool operator==(const CalloutResolution & r) const - { return false; } - // dg00 end - -protected: - - Resolution() {} - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: Pointer to charater string bit list encoding (opt) - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - -private: // functions -private: // Data - - -}; - - -#endif /* iipResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- --------- ---- -------- -------- ------------------------------- -// v4r1 05/01/96 dgilbert Replaces ACTION_CLASS -// dg00 d49420.07 v5r2 11/09/00 dgilbert Add support for operator== -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.C b/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.C deleted file mode 100755 index 14c931db8..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.C +++ /dev/null @@ -1,313 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolutionFactory.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1997,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 */ - -/** - @file iipResolutionFactory.h - @brief ResolutionFactory definition - */ -// Module Description ************************************************** -// -// Description: -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define iipResolutionFactory_C - -#include <iipResolutionFactory.h> -#include <prdfFlyWeight.C> // dg01 -#include <prdfFlyWeightS.C> -#include <prdfPlatServices.H> - -#undef iipResolutionFactory_C -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// class static Variables -//---------------------------------------------------------------------- - -// dg01 - delete 4 lines of code -// pw01 - This stuff doesn't appear to be needed anymore. -/*class CalloutFW; // dg01 -class ResolutionLinkFW; // dg01 -class ThresholdResolutionList; // dg02 -class MaskResolutionFW; // dg02 -class ConnectedFW; // dg04a -class AnalyzeCFW; // dg05a -class PluginCallFW; // dg06a -class ThresholdSigFW; // dg06a -class EregResolutionFW; // dg06a -class TryResolutionFW; // dg06a -class FlagResolutionFW; // dg06a -class DumpResolutionFW; // dg06a -class GardResolutionFW; // dg06a -*/ - -using namespace PRDF; - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -ResolutionFactory & ResolutionFactory::Access(void) -{ - static ResolutionFactory rf; - return(rf); -} - -//--------------------------------------------------------------------- - -ResolutionFactory::~ResolutionFactory() -{ -} - -// --------------------------------------------------------------------- - -Resolution & ResolutionFactory::GetCalloutResolution(PRDcallout callout, - PRDpriority p) -{ - // search for existing callout - // dg01 start - CalloutResolution key(callout,p); - return iv_Callouts.get(key); - // dg01 end -} - -// ---------------------------------------------------------------------- - -Resolution & ResolutionFactory::LinkResolutions(Resolution & r1, - Resolution & r2) -{ - // dg01 start - // search for existing link - ResolutionFactory::ResolutionLink key(r1,r2); - return iv_Links.get(key); - // dg01 end -} - -// --------------------------------------------------------------------- - -int32_t ResolutionFactory::ResolutionLink::Resolve( - STEP_CODE_DATA_STRUCT & serviceData ) -{ - int32_t rc = xlnk1->Resolve(serviceData); - if (rc == SUCCESS) rc = xlnk2->Resolve(serviceData); - return rc; -} - -// dg02a - start -MaskResolution & ResolutionFactory::GetThresholdResolution( uint32_t maskId, - const ThresholdResolution::ThresholdPolicy & policy, - const ThresholdResolution::ThresholdPolicy & mfgPolicy ) -{ - MaskResolution * r = NULL; - if ( !PRDF::PlatServices::mfgMode() ) - { - r = &iv_thresholdResolutions.get(ThresholdResolution(maskId,policy)); - } - else - { - r = &iv_thresholdResolutions.get(ThresholdResolution(maskId,mfgPolicy)); - } - return *r; -} - -MaskResolution & ResolutionFactory::GetThresholdResolution( uint32_t maskId, - const ThresholdResolution::ThresholdPolicy & policy ) -{ - MaskResolution * r = NULL; - if ( !PRDF::PlatServices::mfgMode() && - !(policy == ThresholdResolution::cv_mnfgDefault) ) - { - r = &iv_thresholdResolutions.get(ThresholdResolution(maskId,policy)); - } - else - { - r = &iv_maskResolutions.get(MaskResolution(maskId)); - } - - return *r; -} - -MaskResolution & ResolutionFactory::GetThresholdResolution(uint32_t maskId) -{ - MaskResolution * r = NULL; - if ( !PRDF::PlatServices::mfgMode() ) - { - r = &iv_thresholdResolutions.get( - ThresholdResolution(maskId, - ThresholdResolution::cv_fieldDefault) ); - } - else - { - r = &iv_maskResolutions.get(MaskResolution(maskId)); - } - - return *r; -} - -Resolution & ResolutionFactory::GetConnectedCalloutResolution( - TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx, - PRDpriority i_priority, - Resolution * i_altResolution ) -{ - prdfCalloutConnected key( i_psourceHandle, - i_targetType, - i_idx, - i_priority, - i_altResolution ); - - return iv_connectedCallouts.get(key); -} - -Resolution & ResolutionFactory::GetAnalyzeConnectedResolution( - TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx ) -{ - PrdfAnalyzeConnected key( i_psourceHandle, i_targetType, i_idx ); - - return iv_analyzeConnected.get(key); -} - -Resolution & ResolutionFactory::GetPluginCallResolution( - PrdfExtensibleChip * i_chip, PrdfExtensibleChipFunction * i_function) -{ - return iv_pluginCallFW.get(PrdfPluginCallResolution(i_chip,i_function)); -} - -Resolution & ResolutionFactory::GetThresholdSigResolution( - const ThresholdResolution::ThresholdPolicy & policy ) -{ - return iv_thresholdSigFW.get(ThresholdSigResolution(policy)); -} - -Resolution & ResolutionFactory::GetEregResolution(ErrorRegisterType & er) -{ - return iv_eregResolutionFW.get(EregResolution(er)); -} - -Resolution & ResolutionFactory::GetTryResolution( Resolution & tryRes, - Resolution & defaultRes ) -{ - return iv_tryResolutionFW.get(TryResolution(tryRes,defaultRes)); -} - -Resolution & ResolutionFactory::GetFlagResolution(ServiceDataCollector::Flag flag) -{ - return iv_flagResolutionFW.get(FlagResolution(flag)); -} - -#ifdef __HOSTBOOT_MODULE -Resolution & ResolutionFactory::GetDumpResolution( - /* FIXME: hwTableContent iDumpRequestContent, */ - TARGETING::TargetHandle_t i_pDumpHandle ) -{ - return iv_dumpResolutionFW.get(DumpResolution(/*FIXME: iDumpRequestContent,*/ i_pDumpHandle)); -} -#else -Resolution & ResolutionFactory::GetDumpResolution( - hwTableContent iDumpRequestContent, - TARGETING::TargetHandle_t i_pDumpHandle ) -{ - return iv_dumpResolutionFW.get(DumpResolution(iDumpRequestContent, i_pDumpHandle)); -} -#endif - -Resolution & ResolutionFactory::GetGardResolution(GardResolution::ErrorType et) -{ - return iv_gardResolutionFW.get(GardResolution(et)); -} - -Resolution & ResolutionFactory::GetCaptureResolution - (PrdfExtensibleChip * i_chip, - uint32_t i_group) -{ - return iv_captureResolutionFW.get(PrdfCaptureResolution(i_chip,i_group)); -} - -Resolution & ResolutionFactory::GetClockResolution( - TARGETING::TargetHandle_t i_pClockHandle, - TARGETING::TYPE i_targetType ) -{ - return iv_clockResolutionFW.get( PrdfClockResolution(i_pClockHandle, - i_targetType) ); -} - -void ResolutionFactory::Reset() -{ - PRDF_INF( "ResolutionFactory.Reset()" ); - - iv_thresholdResolutions.clear(); - iv_Links.clear(); // we must clear this because it could have links to Thresholds - iv_pluginCallFW.clear(); - iv_thresholdSigFW.clear(); - iv_eregResolutionFW.clear(); - iv_tryResolutionFW.clear(); - iv_captureResolutionFW.clear(); //dgxx - iv_connectedCallouts.clear(); // Clear because the "alt resolution" could have be a link or other cleared resolution. - iv_clockResolutionFW.clear(); //jl01a - -} -// dg03a end -// Change Log ************************************************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- --------- ---- -------- -------- --------------------------------------------------------- -// 02/28/97 DGILBERT Initial Creation -// D49274.11 v4r5 01/20/99 SERAFIN Increased MAX_CALLOUT_RESOLUTIONS and MAX_LINKS -// D49420.1 v5r2 07/17/00 mkobler Add interface which uses ChipEnums -// d49420.2 v5r2 09/20/00 dgilbert increase link vector size -// d49420.7 v5r2 11/10/00 dgilbert move GetCalloutResolution(CHIP_ID...) -// to xspprdCondorOnly.C -// d49420.7 v5r2 11/20/00 mkobler change default list/link size -// d49420.10 v5r2 01/16/00 mkobler change default callout list size -// dg00 p4907689 v5r2 02/22/01 dgilbert link/list size += 1000 -// csp 07/11/01 dgilbert rewrite to solve size problem -// dg01 fips 08/09/02 dgilbert rewrite using FlyWeight template -// dg02 400647 fips 03/24/03 dgilbert add GetThresholdResolution() -// dg04 493306 235 03/01/05 dgilbert Add prdfCalloutConnected -// 497866 235 03/29/05 dgilbert add idx & priority to prdfCalloutConnected -// dg05 498293 310 04/06/05 dgilbert add analyzeConnected -// pw01 F527129 f300 10/31/05 iawillia Move inlined code to .C so it compiles. -// ecdf F550548 f300 05/04/06 iawillia eClipz DUMP flags support. -// dg05 f310 05/18/07 dgilbert Clear iv_captureResolutoinFW to prevent memory leak. -// End Change Log ********************************************************************************* diff --git a/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.h b/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.h deleted file mode 100755 index e3ff286da..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolutionFactory.h +++ /dev/null @@ -1,453 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolutionFactory.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1997,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 iipResolutionFactory_h -#define iipResolutionFactory_h - -/** - @file iipResolutionFactory.h - @brief ResolutionFactory declairation - */ -// Class Description ************************************************* -// -// Name: ResolutionFactory -// Base class: None -// -// Description: Maintains a pool of Analysis Resolutions such that only -// one instance of a particular Resolution object exists. -// (flyweight) -// Usage: -// -// ResolutionFactory & resolutionPool = ResolutionFactory::Access(); -// FinalResolution & fr = resolutionPool.GetCalloutResolution(EAGLE0_HIGH); -// -// -// End Class Description ********************************************* - -//#include <xspprdIfCondor.h> // #define CSP_CONDOR - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#if !defined(IIPCONST_H) -#include <iipconst.h> -#endif - -#if !defined(PRDFFLYWEIGHT_H) // dg01 -#include <prdfFlyWeight.H> // dg01 -#include <prdfFlyWeightS.H> -#endif // dg01 - -#if !defined(iipCalloutResolution_h) -#include <iipCalloutResolution.h> -#endif - -#if !defined(PRDFTHRESHOLDRESOLUTIONS_H) // dg02a -#include <prdfThresholdResolutions.H> // dg02a -#endif // dg02a - -#include <prdfCalloutConnected.H> // dg04a -#include <prdfAnalyzeConnected.H> // dg05a -#include <prdfPluginCallResolution.H> // dg06a -#include <iipEregResolution.h> // dg06a -#include <xspprdTryResolution.h> // dg06a -#include <xspprdFlagResolution.h> // dg06a -#include <xspprdDumpResolution.h> // dg06a -#include <xspprdGardResolution.h> // dg06a -#include <prdfCaptureResolution.H> // pw01 -#include <prdfClockResolution.H> // jl01a - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -/** - "Flyweight" factory of resolutions (singlton) - @version V4R5 - @author Douglas R. Gilbert -*/ -class ResolutionFactory -{ -public: - - /** - Access the ResolutionFactory singleton - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> Resolution factory - <br><b>Requirements:</b> None. - <br><b>Promises: </b> Object created if it does not already exist - <br><b>Exceptions: </b> None. - </ul><br> - */ - static ResolutionFactory & Access(void); - - /** - DTOR - <ul> - <br><b>Requirements:</b> None. - <br><b>Promises: </b> Resources released - <br><b>Exceptions: </b> None. - </ul><br> - */ - ~ResolutionFactory(); - - - // dg03a start - /** - Reset after a re-ipl - Clear the resolution lists that need clearing on a re-ipl - @note currently clears the threshold resolution list and the link resolution list - */ - void Reset(); - // dg03a end - - /** - Get a resolution that makes a callout - <ul> - <br><b>Parameter: </b> PRDcallout (see prdfCallouts.H) - <br><b>Parameter: </b> PRDpriority (see prdfCallouts.H) - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> None. - <br><b>Promises: </b> If a resolution does not exist for this MruCallout - then one is created. - <br><b>Exceptions: </b> None. - <br><b>Note: </b> Regatta CSP use only - <br><b>Note: </b> Do not call this method from a static object - </ul><br> - */ - Resolution & GetCalloutResolution( PRDF::PRDcallout callout, - PRDF::PRDpriority p = PRDF::MRU_MED); - - /** - Get a threshold Resolution - @param Mask id to set when threshold is reached - @param policy (theshold value & time interval) during normal runtime (default is ???) - @param mfgPolicy for manufactoring mode (default is threshold one, infinate interval) - @return reference to a resolution - @pre None - @post appropriate Resolution created. - @note the iv_thresholdResoltion FlyWeight is cleared by this->Reset() - */ - MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy& policy, - const ThresholdResolution::ThresholdPolicy& mfgPolicy); - - MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy& policy); - - MaskResolution & GetThresholdResolution(uint32_t maskId); - MaskResolution & GetThresholdResolution(uint32_t maskId, - const ThresholdResolution::ThresholdPolicy* policy); - - // dg04a - start - /** - GetConnectedCalloutResolution - @param i_psourceHandle handle of connection source - @param i_targetType Type of target connected to i_source - @param idx index in GetConnected list to use - @param i_priority @see prdfCallouts.H - @param i_altResolution to use if the connection does not exist, is not functional, or is invalid. - If NULL than the connection source is called-out - @note Don't use this to callout clocks - use prdfClockResolution - */ - Resolution & GetConnectedCalloutResolution(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx = 0, - PRDF::PRDpriority i_priority = PRDF::MRU_MED, - Resolution * i_altResolution = NULL); - // dg04a - end - - // dg05a - start - /** - * GetAnalyzeConnectedResoltuion - * @param i_psourceHandle handle of connection source - * @param i_targetType type of desired unit that's connected to the source - * @param i_dx index in GetConnected list to analyze - */ - Resolution & GetAnalyzeConnectedResolution(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx =0xffffffff ); - // dg05a - end - // dg06a - start - /** - * Get a PrdfPluginCallResolution - * @param ptr to PrdfExtensibleChip - * @param ptr to PrdfExtensibleFunction - * @post one instance with these params will exist - * @This flyweight is cleared by this->Reset() - */ - Resolution & GetPluginCallResolution(PrdfExtensibleChip * i_chip, - PrdfExtensibleChipFunction * i_function); - - /** - * Get a threshold signature resolution - * @param policy (either enum or uint32_t) - * @post one instance with this policy will exist - * @this flyweight is cleared by this->Reset() - */ - Resolution & GetThresholdSigResolution(const ThresholdResolution::ThresholdPolicy& policy); - - - /** - * Get an EregResolution - * @param Error register - * @post one instance with the param will exist - * @note the error register provided must remain in scope as long as the Resolution Factory - * @note This Flyweight is cleared by this->Reset() - */ - Resolution & GetEregResolution(ErrorRegisterType & er); - - /** - * Get a TryResolution - * @param Resolution to try - * @param Resolution to use if the first one returns a non-zero return code - * @post one instance with these params will exist - * @note The resolutions provided mus remain in scope as long as the Resolution Factory - * @note This Flyweight is cleared by this->Reset() - */ - Resolution & GetTryResolution(Resolution &tryRes, Resolution & defaultRes); - - /** - * Get a FlagResolution - * @param servicedatacollector::flag - * @post only one instance of this object with this param will exist - */ - Resolution & GetFlagResolution(ServiceDataCollector::Flag flag); - - /** - * Get a DumpResolution - * @param dump flags - * @post only one instance of this obect with these paramaters will exist - */ - #ifdef __HOSTBOOT_MODULE - Resolution & GetDumpResolution(/* FIXME: hwTableContent iDumpRequestContent = CONTENT_HW,*/ - TARGETING::TargetHandle_t i_pDumpHandle = NULL); - #else - Resolution & GetDumpResolution(hwTableContent iDumpRequestContent = CONTENT_HW, - TARGETING::TargetHandle_t i_pDumpHandle = NULL); - #endif - - /** - * Get a Gard Resolution - * @param The Gard Flag - * @post only one instance of this object with this param will exist - */ - Resolution & GetGardResolution(GardResolution::ErrorType et); - - // dg06a - end - - /** - * Get a Capture Resolution - * @param i_chip - The extensible chip to capture from. - * @param i_group - The group to capture. - * @post only one instance of this object with this param will exist - */ - Resolution & GetCaptureResolution(PrdfExtensibleChip * i_chip, - uint32_t i_group); - - /** - * Get a ClockResolution - * @param - * @post only one instance of this obect with these paramaters will exist - */ - // FIXME: Need support for clock targets - // FIXME: Need support for clock targets types - Resolution & GetClockResolution(TARGETING::TargetHandle_t i_pClockHandle =NULL, - TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC); //should be repla -/** - Link resolutions to form a single resolution performing the actions of them all - <ul> - <br><b>Parameters: </b> Resolutions - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> Valid resolutions given - <br><b>Promises: </b> LinkResolutions(r1,r2...).Resolve(); == - r1.Resolve(), r2.Resolve(), ...; - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Do not call this method from a static object - <br><b>Notes: </b> The iv_Links Flyweight is cleared by this->Reset() - </ul><br> - */ - Resolution & LinkResolutions(Resolution &r1, Resolution &r2); - /** - Link resolutions to form a single resolution performing the actions of them all - <ul> - <br><b>Parameters: </b> Resolutions - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> Valid resolutions given - <br><b>Promises: </b> LinkResolutions(r1,r2...).Resolve(); == - r1.Resolve(), r2.Resolve(), ...; - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Do not call this method from a static object - </ul><br> - */ - Resolution & LinkResolutions(Resolution &r1, Resolution &r2, Resolution &r3); - /** - Link resolutions to form a single resolution performing the actions of them all - <ul> - <br><b>Parameters: </b> Resolutions - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> Valid resolutions given - <br><b>Promises: </b> LinkResolutions(r1,r2...).Resolve(); == - r1.Resolve(), r2.Resolve(), ...; - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Do not call this method from a static object - </ul><br> - */ - Resolution & LinkResolutions(Resolution &r1, Resolution &r2, Resolution &r3, - Resolution &r4); - /** - Link resolutions to form a single resolution performing the actions of them all - <ul> - <br><b>Parameters: </b> Resolutions - <br><b>Returns: </b> Resolution & - <br><b>Requirements:</b> Valid resolutions given - <br><b>Promises: </b> LinkResolutions(r1,r2...).Resolve(); == - r1.Resolve(), r2.Resolve(), ...; - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Do not call this method from a static object - </ul><br> - */ - Resolution & LinkResolutions(Resolution &r1, Resolution &r2, Resolution &r3, - Resolution &r4, Resolution &r5); - -private: // functions - - /** - private CTOR - <ul> - <br><b>Requirements:</b> May only be called once - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None. - </ul><br> - */ - ResolutionFactory() {} - - ResolutionFactory(const ResolutionFactory &f); // not allowed - ResolutionFactory & operator=(const ResolutionFactory &f); // not allowed - -public: - /** - Link resolutions together - @author Douglas R. Gilbert - @version V4R3 - */ - class ResolutionLink: public Resolution - { - public: - ResolutionLink(): Resolution(), xlnk1(NULL), xlnk2(NULL) {} - ResolutionLink(Resolution & r1, Resolution & r2) - : Resolution(), xlnk1(&r1), xlnk2(&r2) {} - ResolutionLink(const ResolutionLink & rl) - : xlnk1(rl.xlnk1), xlnk2(rl.xlnk2) {} - bool operator==(const ResolutionLink & r) const - { return (xlnk1 == r.xlnk1 && xlnk2 == r.xlnk2); }; - bool operator<(const ResolutionLink & r) const - { - if (xlnk1 == r.xlnk1) - return xlnk2 < r.xlnk2; - return xlnk1 < r.xlnk1; - }; - bool operator>=(const ResolutionLink & r) const - { - if (xlnk1 == r.xlnk1) - return xlnk2 >= r.xlnk2; - return xlnk1 >= r.xlnk1; - }; - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & serviceData); - private: // data - Resolution * xlnk1; - Resolution * xlnk2; - }; - -private: // Data - - // dg01 - start - typedef FlyWeight< CalloutResolution, 50> CalloutFW; // dg01a - typedef FlyWeightS< ResolutionLink, 50> ResolutionLinkFW; // dg01a - - typedef FlyWeight< ThresholdResolution, 50 > ThresholdResolutionList; // dg02a - typedef FlyWeight< MaskResolution, 50 > MaskResolutionFW; // dg02a - - typedef FlyWeight< prdfCalloutConnected, 25 > ConnectedFW; // dg04a - typedef FlyWeight< PrdfAnalyzeConnected, 20 > AnalyzeCFW; // dg05a - typedef FlyWeight< PrdfPluginCallResolution, 10 > PluginCallFW; // dg06a - typedef FlyWeight< ThresholdSigResolution, 10 > ThresholdSigFW; // dg06a - typedef FlyWeight< EregResolution, 50 > EregResolutionFW; // dg06a - typedef FlyWeight< TryResolution, 20 > TryResolutionFW; // dg06a - typedef FlyWeight< FlagResolution, 5 > FlagResolutionFW; // dg06a - typedef FlyWeight< DumpResolution, 5 > DumpResolutionFW; // dg06a - typedef FlyWeight< GardResolution, 5 > GardResolutionFW; // dg06a - typedef FlyWeight< PrdfCaptureResolution, 5> CaptureResolutionFW; // pw01 - typedef FlyWeight< PrdfClockResolution, 8 > ClockResolutionFW; // jl01a - - CalloutFW iv_Callouts; // dg01a - ResolutionLinkFW iv_Links; // dg01a - - ThresholdResolutionList iv_thresholdResolutions; // dg02a - MaskResolutionFW iv_maskResolutions; // dg02a - // dg01 - end - ConnectedFW iv_connectedCallouts; // dg04a - AnalyzeCFW iv_analyzeConnected; // dg05a - PluginCallFW iv_pluginCallFW; // dg06a - ThresholdSigFW iv_thresholdSigFW; // dg06a - EregResolutionFW iv_eregResolutionFW; // dg06a - TryResolutionFW iv_tryResolutionFW; // dg06a - FlagResolutionFW iv_flagResolutionFW; // dg06a - DumpResolutionFW iv_dumpResolutionFW; // dg06a - GardResolutionFW iv_gardResolutionFW; // dg06a - CaptureResolutionFW iv_captureResolutionFW; // pw01 - ClockResolutionFW iv_clockResolutionFW; // jl01a - -}; - -inline -Resolution & ResolutionFactory::LinkResolutions(Resolution &r1, - Resolution &r2, - Resolution &r3) -{ - return LinkResolutions(LinkResolutions(r1,r2),r3); -} - -inline -Resolution & ResolutionFactory::LinkResolutions(Resolution &r1, - Resolution &r2, - Resolution &r3, - Resolution &r4) -{ - return LinkResolutions(LinkResolutions(r1,r2),LinkResolutions(r3,r4)); -} - -inline -Resolution & ResolutionFactory::LinkResolutions(Resolution &r1, - Resolution &r2, - Resolution &r3, - Resolution &r4, - Resolution &r5) -{ - return LinkResolutions(LinkResolutions(r1,r2),LinkResolutions(r3,r4,r5)); -} - -#endif /* iipResolutionFactory_h */ diff --git a/src/usr/diag/prdf/framework/resolution/iipResolutionList.h b/src/usr/diag/prdf/framework/resolution/iipResolutionList.h deleted file mode 100755 index 96c2ad8b5..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolutionList.h +++ /dev/null @@ -1,185 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolutionList.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipResolutionList_h -#define iipResolutionList_h - -// Class Description ************************************************* -// -// Name: ResolutionList -// Base class: Resolution -// -// Description: A Resolution whose Resolve function calls the Resolve -// function on each Resolution in a List of Resolutions. -// Usage: -// -// MruCallout calloutList[] = {PU0,PU1}; -// FinalResolution r1(calloutList,2); -// CaptureResolution r2(someScanCommRegister); -// -// ResolutionList rl(&r1,&r2); // up to 4 resolutions -// -// ResolutionMap rm(...); // see iipResolutionMap.h -// rm.Add(BIT_LIST_STRING_01,&rl); // When bit 1 is on perform r1 and r2 -// -// End Class Description ********************************************* -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#include <vector> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -class ResolutionList : public Resolution -{ -public: - ResolutionList(Resolution * r1,Resolution * r2); - ResolutionList(Resolution * r1,Resolution * r2,Resolution * r3); - ResolutionList(Resolution * r1,Resolution * r2,Resolution * r3,Resolution * r4); - ResolutionList(Resolution * r1,Resolution * r2,Resolution * r3, - Resolution * r4,Resolution * r5); - ResolutionList(Resolution * r1,Resolution * r2,Resolution * r3, - Resolution * r4,Resolution * r5,Resolution * r6); - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: r1 - r4: 2-4 Resolutions to perform as one resolution - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - - //~ResolutionList(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default is ok - // - // End Function Specification **************************************** - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - // Function Specification ******************************************** - // - // Purpose: Resolve service data for a specific error bit (Pure Virtual) - // Parameters: Reference to the Step code data structure - // Returns: return code - // Requirements: None - // Promises: if rc = SUCCESS then data filled with apropriate service data - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** - -private: // functions - - ResolutionList(const ResolutionList &rl); // not allowed - ResolutionList & operator=(const ResolutionList &rl); // not allowed - -private: // Data - - std::vector<void *> resolutionList; // use void * to reduce template code bloat - -}; - -inline -ResolutionList::ResolutionList(Resolution * r1,Resolution * r2) -{ - resolutionList.reserve(2); - resolutionList.push_back(r1); - resolutionList.push_back(r2); -} - -inline -ResolutionList::ResolutionList(Resolution * r1,Resolution * r2,Resolution * r3) -{ - resolutionList.reserve(3); - resolutionList.push_back(r1); - resolutionList.push_back(r2); - resolutionList.push_back(r3); -} - -inline -ResolutionList::ResolutionList(Resolution * r1,Resolution * r2, - Resolution * r3,Resolution * r4) -{ - resolutionList.reserve(4); - resolutionList.push_back(r1); - resolutionList.push_back(r2); - resolutionList.push_back(r3); - resolutionList.push_back(r4); -} - -inline -ResolutionList::ResolutionList(Resolution * r1,Resolution * r2, - Resolution * r3,Resolution * r4, - Resolution * r5) -{ - resolutionList.reserve(5); - resolutionList.push_back(r1); - resolutionList.push_back(r2); - resolutionList.push_back(r3); - resolutionList.push_back(r4); - resolutionList.push_back(r5); -} - -inline -ResolutionList::ResolutionList(Resolution * r1,Resolution * r2, - Resolution * r3,Resolution * r4, - Resolution * r5,Resolution * r6) -{ - resolutionList.reserve(6); - resolutionList.push_back(r1); - resolutionList.push_back(r2); - resolutionList.push_back(r3); - resolutionList.push_back(r4); - resolutionList.push_back(r5); - resolutionList.push_back(r6); -} - - -#endif /* iipResolutionList_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// d24758.1 v4r1 05/30/96 DRG Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipResolutionMap.h b/src/usr/diag/prdf/framework/resolution/iipResolutionMap.h deleted file mode 100755 index 4b1f10ebc..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipResolutionMap.h +++ /dev/null @@ -1,24 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipResolutionMap.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 */ - -#include <prdfResolutionMap.H> diff --git a/src/usr/diag/prdf/framework/resolution/iipTerminateResolution.h b/src/usr/diag/prdf/framework/resolution/iipTerminateResolution.h deleted file mode 100755 index 51843628d..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipTerminateResolution.h +++ /dev/null @@ -1,139 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipTerminateResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1997,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 iipTerminateResolution_h -#define iipTerminateResolution_h - -// Class Description ************************************************* -// -// Name: TerminateResolution -// Base class: Resolution -// -// Description: This module contains the Processor Runtime -// Diagnostics TerminateResolution class declaration. -// TerminateResolution provides a mechanism to terminate -// the operation of the machine on a recovered error attention -// after PRD exists. -// This resolution was made to be used with other Resolutions in -// a resolution list. -// -// Usage: Abstract base class -// -// Static Globals -// TerminateResolution bringDownMachine(); -// FinalResolution co(&someMruList); -// ResolutionList resolution (&co,&bringDownMachine); -// -// int32_t foo(ResolutionMap &resolutionMap) -// { -// resolutionMap.Add(BIT_LIST_STRING_01,&resolution); -// } -// ... -// int32_t foo(STEP_CODE_DATA_STRUCT &serviceData, -// ResolutionMap &map) -// { -// Resolution &r = map.LookUp(BIT_LIST_STRING_01); -// int32_t rc = r.Resolve(serviceData); // flag the termination of machine -// return(rc); -// } -// -// End Class Description ********************************************* -/*--------------------------------------------------------------------*/ - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class TerminateResolution: public Resolution -{ -public: - TerminateResolution(); - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: None - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - // virtual ~TerminateResolution(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: The compiler default is sufficient - // - // End Function Specification **************************************** - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); - // Function Specification ******************************************** - // - // Purpose: Tells the ServiceDataCollector (data) that machine operation - // needs to be terminated. - // Parameters: Reference to the ServiceDataCollector - // Returns: Return code (rc) - // Requirements: None - // Promises: data.serviceData->Terminate() == TRUE - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** - - - // Copy ctor - compiler default is sufficient - // Assignment - compiler default is sufficient - -private: // functions -private: // Data - - -}; - -inline -TerminateResolution::TerminateResolution(): Resolution() {} - -#endif /* iipResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// V4R1 09/13/96 DRG Created -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/iipThresholdResolution.h b/src/usr/diag/prdf/framework/resolution/iipThresholdResolution.h deleted file mode 100755 index a6e9ff668..000000000 --- a/src/usr/diag/prdf/framework/resolution/iipThresholdResolution.h +++ /dev/null @@ -1,158 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/iipThresholdResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1996,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 iipThresholdResolution_h -#define iipThresholdResolution_h - -// Class Description ************************************************* -// -// Name: ThresholdResolution -// Base class: Resolution -// -// Description: Resolution that has a threshold and keeps track of how -// many times its called. When the threshold is reached, it -// tells the service data collector and sends it a mask id. -// Usage: -// -// MruCallout callout[] = {PU0}; -// enum { thresholdValue = 32, MaskId = 05 }; -// ThresholdResolution tr(thresholdValue,MaskId); -// FinalResolution fr(callout,1); -// ResolutionList rl(&tr,&fr); -// ResolutionMap rm(...); -// rm.Add(BIT_LIST_STRING_05,&rl); // Resolution invoked when bit 5 -// is on - callsouts callout and -// thresholds at thresholdValue -// -// End Class Description ********************************************* - -/** - @file iipThresholdResolution.h - @brief PRD ThresholdResolution class declairation -*/ - -#include <prdfThresholdResolutions.H> -#warning This part is obsolite - -#if defined(_OBSOLITE_) -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -class ThresholdResolution : public Resolution -{ -public: - ThresholdResolution(uint16_t thresholdValue, uint32_t mask_id); -// ThresholdResolution(uint16_t thresholdValue, uint32_t mask_id, Resolution &r); - // Function Specification ******************************************** - // - // Purpose: Constructor - // Parameters: thresholdValue: value at which threshold is reached - // mask_id: mask_id value to give to the service data - // Resolution: Another resolution to call when this one - // is called - // Returns: Nothing - // Requirements: None - // Promises: Object created - // Exceptions: None - // Concurrency: synchronous - // Notes: - // - // End Function Specification **************************************** - - // ~ThresholdResolution(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default ok - // - // End Function Specification **************************************** - - // copy ctor - Compiler default ok - // Assignment - Compiler default ok - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - // Function Specification ******************************************** - // - // Purpose: Resolve service data for a specific error bit - // Parameters: Reference to the Step code data structure - // Returns: return code - // Requirements: None - // Promises: count++; - // if count > threshold then - // error.service_data->IsAtThreshold() == TRUE - // maskId sent to error.service_data - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** - - -private: // functions -protected: // Data - - uint16_t threshold; // dg00c - uint16_t count; // dg00c - uint32_t maskId; // dg00c -// Resolution * xRes; -}; - -inline -ThresholdResolution::ThresholdResolution(uint16_t thresholdValue, uint32_t mask_id) -: Resolution(), threshold(thresholdValue), count(0), maskId(mask_id) //, xRes(NULL) -{} - -/* -inline -ThresholdResolution::ThresholdResolution(uint16_t thresholdValue, - uint32_t mask_id, - Resolution & r) -: Resolution(), threshold(thresholdValue), count(0), maskId(mask_id), xRes(&r) -{} -*/ -#endif // _OBSOLITE_ -#endif /* iipThresholdResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------ -------- ----- ------------------------------- -// d49127.1 v4r1m0 05/31/96 DRG Initial Creation -// dg00 390545 fsp 02/26/03 dgilbert increase size of vars -// dg01 400647 fips 03/31/03 dgilbert This part is going away (see prdfThreholdResolutions.H) -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/prdfAnalyzeConnected.H b/src/usr/diag/prdf/framework/resolution/prdfAnalyzeConnected.H deleted file mode 100755 index 18d17b13a..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfAnalyzeConnected.H +++ /dev/null @@ -1,125 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfAnalyzeConnected.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2005,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 PRDFANALYZECONNECTED_H -#define PRDFANALYZECONNECTED_H -/** - @file prdfAnalyzeConnected.H - @brief A resolution to analyze a connected chip determined at the time of - the error. -*/ - - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#include <iipResolution.h> -#include <prdfPlatServices.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -struct STEP_CODE_DATA_STRUCT; - -/** - This resolution calls out a connected MRU. - @author Patrick Williams - @par - This resolution calls out a connected chip, but waits until the time of - the error to determine what's connected. This allows for runtime GARD, - dynamic failover and concurrent maintainance - without having to call - PRD to re-build itself. -*/ -class PrdfAnalyzeConnected : public Resolution -{ -public: - /** - default ctor - */ - PrdfAnalyzeConnected(void); - - /** - Constructor - @param i_psourceHandle target handle of connection source - @param i_targetType i_targetType of desired unit that's connected to i_psourceHandle - @param i_idx: index into getConnected list of chip. - */ - PrdfAnalyzeConnected(TARGETING::TargetHandle_t i_psourceHandle , - TARGETING::TYPE i_targetType, - uint32_t i_idx =0xffffffff ); - - // ~prdfAnalyzeConnected(); default dtor is sufficient - - /** - Determine chip object for current connected unit and call its analyze func. - @param service data collector - @pre None - @return SUCCESS | non-zero if chip not found. - @note if the call to getConnected yeilds an invalid homId 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 bool operator==(const PrdfAnalyzeConnected & r) const; - -private: // functions -private: // Data - - TARGETING::TargetHandle_t iv_psourceHandle; - TARGETING::TYPE iv_targetType; - uint32_t iv_idx; -}; - -inline PrdfAnalyzeConnected::PrdfAnalyzeConnected(void) - : iv_psourceHandle(NULL), - iv_targetType(TARGETING::TYPE_NA), - iv_idx(0xffffffff) -{ -} - -inline PrdfAnalyzeConnected::PrdfAnalyzeConnected( - TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx) - : iv_psourceHandle(i_psourceHandle), - iv_targetType(i_targetType), - iv_idx(i_idx) -{ -} - -inline bool PrdfAnalyzeConnected::operator==(const PrdfAnalyzeConnected & r) const -{ - return (iv_psourceHandle == r.iv_psourceHandle && - iv_targetType == r.iv_targetType && - iv_idx == r.iv_idx); -} - -#endif /* PRDFANALYZECONNECTED_H */ - -// Change Log ***************************************************************** -// -// Flag Reason Vers Date Coder Description -// ---- --------- ----- -------- -------- ------------------------------------ -// 498293 f310 03/31/05 iawillia Initial Creation -// End Change Log ************************************************************* diff --git a/src/usr/diag/prdf/framework/resolution/prdfCalloutConnected.H b/src/usr/diag/prdf/framework/resolution/prdfCalloutConnected.H deleted file mode 100755 index 3629f2055..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfCalloutConnected.H +++ /dev/null @@ -1,139 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfCalloutConnected.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2004,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 PRDFCALLOUTCONNECTED_H -#define PRDFCALLOUTCONNECTED_H -/** - @file prdfCalloutConnected.H - @brief A resolution to callout a connected MRU determined at the time of the error. -*/ - - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#include <iipResolution.h> -#include <prdfPlatServices.H> -#include <prdfCallouts.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -struct STEP_CODE_DATA_STRUCT; - -/** - This resolution calls out a connected MRU. - @author Doug Gilbert - @par - This resolution calls out a connected MRU, but waits until the time of the error - to determine whats connected. This allows for runtime GARD, dynamic failover and concurrent - maintainance - without having to call PRD to re-build itself. - @code - prdfCalloutConnected iv_callout(PROC, TYPE_MCS ....); - // ...... - // This will add the MCSs thats connected to this PROC to the callout list - iv_callout.Resolve(serviceData); - @endcode - @note Don't use this class to callout clocks - use prdfClockResolution -*/ -class prdfCalloutConnected : public Resolution -{ -public: - /** - default ctor - */ - prdfCalloutConnected(void); - - /** - Constructor - @param i_psourceHandle handle of connection source - @param i_targetType type of desired unit that's connected to i_psourceHandle - @param i_idx index into getConnected list to callout - (i_idx = 0xffffffff means callout the first valid target) - @param i_priority callout priority @see srci.H for priority values - @param i_altResolution to use if the connection does not exist or is invalid. - If NULL than source is called out - @note Don't use this class to callout clocks - use prdfClockResolution - */ - prdfCalloutConnected(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx =0xffffffff , - PRDF::PRDpriority i_priority = PRDF::MRU_MED, - Resolution * i_altResolution = NULL); - - // ~prdfCalloutConnected(); default dtor is sufficient - - /** - Determine callout for current connected unit and add to the service data - @param service data collector - @pre None - @post service_data is complete - @return SUCCESS | non-zero - @note if the call to getConnected yeilds an invalid homId 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 bool operator==(const prdfCalloutConnected & r) const; - -private: // functions -private: // Data - - TARGETING::TargetHandle_t iv_psourceHandle; - TARGETING::TYPE iv_targetType; - uint32_t iv_idx; - PRDF::PRDpriority iv_priority; - Resolution * iv_altResolution; -}; - -inline prdfCalloutConnected::prdfCalloutConnected(void) -: iv_psourceHandle(NULL), - iv_targetType(TARGETING::TYPE_NA), - iv_idx(0xffffffff ), - iv_priority(PRDF::MRU_LOW), - iv_altResolution(NULL) -{} - -inline prdfCalloutConnected::prdfCalloutConnected(TARGETING::TargetHandle_t i_psourceHandle, - TARGETING::TYPE i_targetType, - uint32_t i_idx, - PRDF::PRDpriority i_priority, - Resolution * i_altResolution) -: iv_psourceHandle(i_psourceHandle), - iv_targetType(i_targetType), - iv_idx(i_idx), - iv_priority(i_priority), - iv_altResolution(i_altResolution) -{} - -inline bool prdfCalloutConnected::operator==(const prdfCalloutConnected & r) const -{ - return (iv_psourceHandle == r.iv_psourceHandle && - iv_targetType == r.iv_targetType && - iv_idx == r.iv_idx && - iv_priority == r.iv_priority && - (iv_altResolution == r.iv_altResolution || &iv_altResolution == &r.iv_altResolution)); -} - -#endif /* PRDFCALLOUTCONNECTED_H */ diff --git a/src/usr/diag/prdf/framework/resolution/prdfCalloutMap.H b/src/usr/diag/prdf/framework/resolution/prdfCalloutMap.H deleted file mode 100644 index 48eed6bec..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfCalloutMap.H +++ /dev/null @@ -1,140 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfCalloutMap.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 __prdfCalloutMap_H -#define __prdfCalloutMap_H - -/** @file prdfCalloutMap.H */ - -#include <prdfEnums.H> - -//------------------------------------------------------------------------------ - -namespace PRDF -{ - -//------------------------------------------------------------------------------ - -#ifdef PRDF_RULE_COMPILER_ENUMS - - // Used only in the rule compiler. Sets up a map between string keywords in - // the rule code to the enum name. - - #define PRDF_SYM_CALLOUT_MAP_BEGIN \ - struct SymCallout_t { const char * str; SymbolicFru val; }; \ - SymCallout_t symCalloutArray[] = \ - { - - #define PRDF_SYM_CALLOUT_ALIAS(name1, name2) \ - { #name1 , name1 }, - - #define PRDF_SYM_CALLOUT_MAP_END \ - { NULL , (SymbolicFru) 0 } \ - }; - -#else - - #define PRDF_SYM_CALLOUT_MAP_BEGIN \ - enum SymbolicFru \ - { - - #define PRDF_SYM_CALLOUT_ALIAS(n1,n2) \ - n1 = n2, - - #define PRDF_SYM_CALLOUT_MAP_END \ - }; - -#endif - -PRDF_SYM_CALLOUT_MAP_BEGIN - -PRDF_SYM_CALLOUT_ALIAS( AllProcessors, EPUB_PRC_ALL_PROCS ) -PRDF_SYM_CALLOUT_ALIAS( PRD_Code_ENUM, EPUB_PRC_SP_CODE ) -PRDF_SYM_CALLOUT_ALIAS( SP_CODE, EPUB_PRC_SP_CODE ) -PRDF_SYM_CALLOUT_ALIAS( SystemSW_Code_ENUM, EPUB_PRC_PHYP_CODE ) -PRDF_SYM_CALLOUT_ALIAS( NextLevelSupport_ENUM, EPUB_PRC_LVL_SUPP ) -PRDF_SYM_CALLOUT_ALIAS( MEMBUS_ERROR_ENUM, EPUB_PRC_MEMBUS_ERROR ) -PRDF_SYM_CALLOUT_ALIAS( PassiveFabric_OnNode_ENUM, EPUB_PRC_PROC_XYZ_BUS ) -PRDF_SYM_CALLOUT_ALIAS( PassiveFabric_OffNode_ENUM, EPUB_PRC_PROC_AB_BUS ) - -PRDF_SYM_CALLOUT_MAP_END - -#undef PRDF_SYM_CALLOUT_MAP_BEGIN -#undef PRDF_SYM_CALLOUT_ALIAS -#undef PRDF_SYM_CALLOUT_MAP_END - -//------------------------------------------------------------------------------ - -#ifdef PRDF_RULE_COMPILER_ENUMS - - // Used only in the rule compiler. Sets up a map between string keywords in - // the rule code to the enum name. - - #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \ - struct CalloutPriority_t \ - { const char * str; CalloutPriorityEnum val; }; \ - CalloutPriority_t calloutPriorityArray[] = \ - { - - #define PRDF_CALLOUT_PRIORITY_ALIAS(name1, name2) \ - { #name1 , name1 }, - - #define PRDF_CALLOUT_PRIORITY_MAP_END \ - { NULL , (CalloutPriorityEnum) 0 } \ - }; - -#else - - #define PRDF_CALLOUT_PRIORITY_MAP_BEGIN \ - enum CalloutPriorityEnum \ - { - - #define PRDF_CALLOUT_PRIORITY_ALIAS(n1,n2) \ - n1 = n2, - - #define PRDF_CALLOUT_PRIORITY_MAP_END \ - }; - -#endif - -PRDF_CALLOUT_PRIORITY_MAP_BEGIN - -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_HIGH, SRCI_PRIORITY_HIGH ) -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MED, SRCI_PRIORITY_MED ) -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDA, SRCI_PRIORITY_MEDA ) -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDB, SRCI_PRIORITY_MEDB ) -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_MEDC, SRCI_PRIORITY_MEDC ) -PRDF_CALLOUT_PRIORITY_ALIAS( MRU_LOW, SRCI_PRIORITY_LOW ) - -PRDF_CALLOUT_PRIORITY_MAP_END - -#undef PRDF_CALLOUT_PRIORITY_MAP_BEGIN -#undef PRDF_CALLOUT_PRIORITY_ALIAS -#undef PRDF_CALLOUT_PRIORITY_MAP_END - -//------------------------------------------------------------------------------ - -} // end namespace PRDF - -#endif // __prdfCalloutMap_H - diff --git a/src/usr/diag/prdf/framework/resolution/prdfCallouts.H b/src/usr/diag/prdf/framework/resolution/prdfCallouts.H deleted file mode 100755 index 87a3fd9e5..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfCallouts.H +++ /dev/null @@ -1,198 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfCallouts.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2000,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 prdfCallouts_H -#define prdfCallouts_H - -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ - -#ifndef __HOSTBOOT_MODULE - -#include <srci.H> - -#endif - -#if defined(PRD_SIM) -#include <iipException.h> // for throwing things -#endif - -#include <prdfCalloutMap.H> -#include <prdfEnums.H> -#include <prdfMemoryMru.H> -#include <prdfPlatServices.H> - -namespace PRDF -{ - -//------------------------------------------------------------------------------ - -typedef CalloutPriorityEnum PRDpriority; - -/** - * @brief Wrapper class for PRD callouts (TargetHandle_t, MemoryMru, and - * SymbolicFru). - * @note It is a requirement that all supported callout types have a 32-bit - * representation for storage in the service data collector. - * @note This is a simple container of callout types. It does not translate - * between the different types. - */ -class PRDcallout -{ - public: - - enum MruType - { - TYPE_NONE, - TYPE_TARGET, - TYPE_MEMMRU, - TYPE_SYMFRU, - }; - - /** @brief Constructor */ - PRDcallout() : iv_type(TYPE_NONE) - { iv_meldValue.u32 = 0; } - - /** @brief Constructor from TargetHandle_t */ - PRDcallout( TARGETING::TargetHandle_t i_target ) : iv_type(TYPE_TARGET) - { iv_meldValue.target = i_target; } - - /** @brief Constructor from PrdfMemoryMru */ - PRDcallout( const PrdfMemoryMru & i_memmru ) : iv_type(TYPE_MEMMRU) - { iv_meldValue.u32 = i_memmru.toUint32(); } - - /** @brief Constructor from SymbolicFru */ - PRDcallout( SymbolicFru i_symfru ) : iv_type(TYPE_SYMFRU) - { iv_meldValue.symfru = i_symfru; } - - /** @brief Constructor from raw data */ - PRDcallout( uint32_t i_val, MruType i_type ) : iv_type(i_type) - { - switch ( iv_type ) - { - case TYPE_TARGET: - iv_meldValue.target = PlatServices::getTarget(i_val); break; - case TYPE_MEMMRU: - case TYPE_SYMFRU: - iv_meldValue.u32 = i_val; break; - default: - iv_type = TYPE_NONE; - iv_meldValue.u32 = 0; - } - } - - /** @brief Assignment from TargetHandle_t */ - PRDcallout & operator=( TARGETING::TargetHandle_t i_target ) - { - iv_type = TYPE_TARGET; - iv_meldValue.target = i_target; - return *this; - } - - /** @brief Assignment from PrdfMemoryMru */ - PRDcallout & operator=( const PrdfMemoryMru & i_memmru ) - { - iv_type = TYPE_MEMMRU; - iv_meldValue.u32 = i_memmru.toUint32(); - return *this; - } - - /** @brief Assignment from SymbolicFru */ - PRDcallout & operator=( SymbolicFru i_symfru ) - { - iv_type = TYPE_SYMFRU; - iv_meldValue.symfru = i_symfru; - return *this; - } - - // NOTE: The == operator must be declared within the class definition. - // Meaning, you can't declare this outside the class: - // - // bool operator==( const PRDcallout & l, const PRDcallout & r ) const; - // - // Otherwise, the single-argument constructors listed above will do - // automatic type conversion, which will allow code like this: - // - // TargetHandle_t t; PrdfMemoryMru m; - // if ( t == m ) ... - // - // The safest way to prevent this is to make all of the single-argument - // constructors explicit. However, this will force us to create additional - // code to handle the different callout types. For example, - // ServiceDataCollector::SetCallout() will need to be implemented for each - // callout type. - - /** @brief Overloaded == operator */ - bool operator==( const PRDcallout & r ) const - { - if ( iv_type == r.iv_type ) - { - return ( TYPE_TARGET == iv_type ) - ? iv_meldValue.target == r.iv_meldValue.target - : iv_meldValue.u32 == r.iv_meldValue.u32; - } - - return false; - } - - /** @brief Returns the callout type. */ - MruType getType() const { return iv_type; } - - /** @returns Returns the TargetHandle_t. */ - TARGETING::TargetHandle_t getTarget() const { return iv_meldValue.target; } - - /** @returns Returns the PrdfMemoryMru. */ - PrdfMemoryMru getMemMru() const { return PrdfMemoryMru(iv_meldValue.u32); } - - /** @brief Returns a uint32_t representation of the callout */ - uint32_t flatten() const - { - switch ( iv_type ) - { - case TYPE_TARGET: - return PlatServices::getHuid(iv_meldValue.target); break; - case TYPE_MEMMRU: - case TYPE_SYMFRU: - return iv_meldValue.u32; break; - default: - return 0; - } - } - - private: - - MruType iv_type; - - union - { - TARGETING::TargetHandle_t target; - SymbolicFru symfru; - uint32_t u32; - } iv_meldValue; - -}; - -}; // end namespace PRDF - -#endif /* prdfCallouts_H */ diff --git a/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.C b/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.C deleted file mode 100755 index 2c8228269..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.C +++ /dev/null @@ -1,41 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2006,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 */ - -#include <prdfCaptureResolution.H> -#include <iipServiceDataCollector.h> - -int32_t PrdfCaptureResolution::Resolve(STEP_CODE_DATA_STRUCT & i_error) -{ - if (NULL != iv_chip) - return iv_chip->CaptureErrorData(i_error.service_data->GetCaptureData(), - iv_captureGroup); - return SUCCESS; -}; - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- -------- ------------------------------- -// f310 08/31/06 iawillia Initial File Creation -// End Change Log ***************************************************** - diff --git a/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.H b/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.H deleted file mode 100755 index 223668d64..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.H +++ /dev/null @@ -1,73 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfCaptureResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2006,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 */ - -#include <iipResolution.h> -#include <prdfExtensibleChip.H> - -/** - * @class PrdfCaptureResolution - * @brief Adds a capture-group to the capture data when hitting an error. - */ -class PrdfCaptureResolution : public Resolution -{ - public: - PrdfCaptureResolution() : iv_chip(NULL), iv_captureGroup(0) {}; - - /** @fn PrdfCaptureResolution - * @brief Typical constructor. - * - * @param i_chip - Extensible chip object to capture from. - * @param i_group - Capture-group to gather. - */ - PrdfCaptureResolution(PrdfExtensibleChip * i_chip, - uint32_t i_captureGroup) - : iv_chip(i_chip), - iv_captureGroup(i_captureGroup) {}; - - /** @fn Resolve - * @brief Perform capture. - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error); - - /** - * Comparison operator to aid in ResolutionFactory. - */ - bool operator==(const PrdfCaptureResolution & i_rhs) - { return ((iv_chip == i_rhs.iv_chip) && - (iv_captureGroup == i_rhs.iv_captureGroup)); - }; - private: - - /** The chip to capture from */ - PrdfExtensibleChip * iv_chip; - /** The group id to capture */ - uint32_t iv_captureGroup; - -}; - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- -------- ------------------------------- -// f310 08/31/06 iawillia Initial File Creation -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/prdfClockResolution.C b/src/usr/diag/prdf/framework/resolution/prdfClockResolution.C deleted file mode 100755 index f572b7155..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfClockResolution.C +++ /dev/null @@ -1,93 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfClockResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 */ - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define prdfClockResolution_C -#include <iipServiceDataCollector.h> -#include <prdfClockResolution.H> -#include <prdfPlatServices.H> -#undef prdfClockResolution_C - -//------------------------------------------------------------------------------ -// Member Function Specifications -//------------------------------------------------------------------------------ - -// Find the active clock source and blame it -int32_t PrdfClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData) -{ - using namespace TARGETING; - using namespace PRDF; - - uint32_t l_rc = SUCCESS; - // Use clock routines for CLOCK_CARD types. - // FIXME: The target needs to be compared with valid clock targets. - if ( (iv_targetType == TYPE_PROC) || (iv_targetType == TYPE_MEMBUF) ) - { - // Get clock card. - TargetHandle_t l_ptargetClock = PlatServices::getClockId( - iv_ptargetClock, - iv_targetType ); - - // Find mux if no clock card available. - if(NULL == l_ptargetClock) - { - l_ptargetClock = PlatServices::getClockMux(iv_ptargetClock); - } - - // Callout this chip if nothing else. - if(NULL == l_ptargetClock) - { - l_ptargetClock = iv_ptargetClock; - } - - //Just callout the clock source. - serviceData.service_data->SetCallout(l_ptargetClock); - } - // Get all connected chips for non-CLOCK_CARD types. - else - { - //Callout every device connected to this clock source. - // FIXME: Clock targets will need to be supported in getConnected(). - TargetHandleList l_targetsConnectedToClock = - PlatServices::getConnected( iv_ptargetClock, iv_targetType ); - - for( TargetHandleList::iterator i = l_targetsConnectedToClock.begin(); - i != l_targetsConnectedToClock.end(); ++i ) - { - if ( NULL != (*i) ) - { - serviceData.service_data->SetCallout( *i ); - } - } - } - return(l_rc); -} - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------- -------- -------- ------------------------------ -// D725180 fips720 09/30/09 lukas Initial file creation. -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/prdfClockResolution.H b/src/usr/diag/prdf/framework/resolution/prdfClockResolution.H deleted file mode 100755 index fcc3d5834..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfClockResolution.H +++ /dev/null @@ -1,111 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfClockResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2009,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 prdfClockResolution_H -#define prdfClockResolution_H -// Class Description ************************************************* -// -// Name: ClockResolution -// Base class: Resolution -// -// Description: Set dump information in Service Data Collector -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#include <prdfPlatServices.H> -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class ServiceDataCollector; - -/** - Set dump information in the Service Data Collector - @author Mike Kobler - */ -class PrdfClockResolution : public Resolution -{ -public: - /** - Constructor - <ul> - <br><b>Parameters: </b> - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - // FIXME: The default target type needs to be set to a PROC clock card. - PrdfClockResolution( TARGETING::TargetHandle_t i_pTargetHandle = NULL, - TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC ) : - iv_ptargetClock(i_pTargetHandle), - iv_targetType(i_targetType) - {} - - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryDump() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & data); - - /* - * base class defines operator== so one is needed here - * or the base class version will be used (bad) - */ - bool operator==(const PrdfClockResolution & r) const - { - return ((iv_ptargetClock == r.iv_ptargetClock) && (iv_targetType == r.iv_targetType)); - } - -private: // functions -private: // Data - - TARGETING::TargetHandle_t iv_ptargetClock; - TARGETING::TYPE iv_targetType ; -}; - - -#endif /* prdfClockResolution_H */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------ -------- ------- ---------------------------- -// D725180 fips720 09/30/09 lukas Initial file creation. -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/prdfErrorTypeResolution.H b/src/usr/diag/prdf/framework/resolution/prdfErrorTypeResolution.H deleted file mode 100755 index e6cc7c493..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfErrorTypeResolution.H +++ /dev/null @@ -1,110 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfErrorTypeResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2003,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 prdfErrorTypeResolution_H -#define prdfErrorTypeResolution_H -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#if !defined(iipServiceDataCollector_h) -#include <iipServiceDataCollector.h> -#endif - -/** - @file prdfErrorTypeResolution.H - @brief Set the appropiate error type in the SDC and flag for - Gard if necessary. -*/ -class prdfErrorTypeResolution : public Resolution -{ -public: - - enum ErrorType - { - Repairable = 0, - Correctable = 1, - Uncorrectable = 2, - Fatal = 3, - Catastrophic = 4 - }; - - /** - Constructor - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - prdfErrorTypeResolution(ErrorType et) - : xErrorType(et) {} - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default sufficient - </ul><br> - */ - // ~ErrorTypeResolution(); - - /** - Resolve by adding the error type to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> sdc.GetErrorType() == ErrorType - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & sdc); - -private: // functions -private: // Data - - ErrorType xErrorType; - -}; - - -#endif /* prdfErrorTypeResolution_H */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ------- ------------------------------- -// 02/26/03 mkobler Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/prdfIntervalThresholdResolution.H b/src/usr/diag/prdf/framework/resolution/prdfIntervalThresholdResolution.H deleted file mode 100755 index 072874829..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfIntervalThresholdResolution.H +++ /dev/null @@ -1,189 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfIntervalThresholdResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 prdfIntervalThresholdResolution_H -#define prdfIntervalThresholdResolution_H - -/** - @file prdfIntervalThresholdResolution.H - @brief Common PRD IntervalThresholdResolution class declairation -*/ - -// Class Description ************************************************* -// -// Name: IntervalThresholdResolution -// Base class: Resolution -// -// Description: Resolution that has a threshold and keeps track of how -// many times its called within an interval of time. -// . When the threshold is reached within that time, it -// tells the service data collector and sends it a mask id, -// then resets the threshold count to 0. If the threshold -// is not reached within the specified interval, the -// interval is reset with the count at 1. -// Usage: -// -// MruCallout callout[] = {PU0}; -// enum { thresholdValue = 32, MaskId = 05 , Minutes = 60 }; -// Time intervalValue = 5 * Minutes; // Length set to 5 minutes -// IntervalThresholdResolution itr(thresholdValue,intervalValue,MaskId); -// FinalResolution fr(callout,1); -// ResolutionList rl(&itr,&fr); -// ResolutionMap rm(...); -// rm.Add(BIT_LIST_STRING_05,&rl); // Resolution invoked when bit 5 -// is on - callsout callout and -// thresholds at thresholdValue -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#include <prdfThresholdResolutions.H> -#warning this is an obsolite part - -#if defined(_OBSOLITE_) - -#if !defined(Resolution_h) - #include <iipThresholdResolution.h> -#endif - -#if !defined(PRDFTIMER_H) - #include <prdfTimer.H> -#endif -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -class IntervalThresholdResolution : public ThresholdResolution -{ -public: - /** - Constructor - @param thresholdValue at which threshold is reached - @param intervalValue length of time window (in seconds) - @param mask_id value given to the service data at threshold - @return nothing - @pre None - @post Object created - */ - IntervalThresholdResolution(uint16_t thresholdValue, uint32_t intervalLengthValue, uint32_t mask_id); - - /** - Constructor - @param thresholdValue at which threshold is reached - @param intervalValue length of time window (in seconds) - @param mask_id value given to the service data at threshold - @param Resolution to call from this one. - @return nothing - @pre None - @post Object created - */ -// IntervalThresholdResolution(uint16_t thresholdValue, uint32_t intervalLengthValue, uint32_t mask_id, -// Resolution & r); - - // ~IntervalThresholdResolution(); - // Function Specification ******************************************** - // - // Purpose: Destruction - // Parameters: None. - // Returns: No value returned - // Requirements: None. - // Promises: None. - // Exceptions: None. - // Concurrency: Reentrant - // Notes: Compiler default ok - // - // End Function Specification **************************************** - - // copy ctor - Compiler default ok - // Assignment - Compiler default ok - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - // Function Specification ******************************************** - // - // Purpose: Resolve service data for a specific error bit - // Parameters: Reference to the Step code data structure - // Returns: return code - // Requirements: None - // Promises: count++; - // if currentTime is past intervalEndTime then - // count = 1 - // new intervalEndTime calculated based on currentTime - // else if count == threshold then - // error.service_data->IsAtThreshold() == TRUE - // maskId sent to error.service_data - // count = 0 - // else; // count still remains incremented - // Exceptions: None - // Concurrency: synchronous - // Notes: if rc != SUCCESS then state of service data is unpredictable - // - // End Function Specification **************************************** - - -private: // functions -private: // Data - -// uint8_t threshold; // moved to base class -// uint8_t count; -// uint16_t maskId; - uint32_t intervalLength; - PrdTimer intervalEndTime; -// Resolution * xRes; -}; - -inline -IntervalThresholdResolution::IntervalThresholdResolution(uint16_t thresholdValue, - uint32_t intervalLengthValue, - uint32_t mask_id) -: ThresholdResolution(thresholdValue,mask_id), intervalLength(intervalLengthValue), intervalEndTime() -{} - -/* -inline -IntervalThresholdResolution::IntervalThresholdResolution(uint16_t thresholdValue, - uint32_t intervalLengthValue, - uint32_t mask_id, - Resolution & r) -: ThresholdResolution(thresholdValue,mask_id,r), intervalLength(intervalLengthValue), intervalEndTime() -{} -*/ -#endif // _OBSOLITE_ -#endif /* prdfIntervalThresholdResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------ -------- ----- ------------------------------- -// ft637.1 csp 02/28/02 RAC Initial Creation -// 368019 fsp 09/03/02 dgilbert port to FSP -// 390545 fsp 02/26/03 dgilbert inherrit from TresholdResolution -// -// End Change Log ***************************************************** - - -/***************** END File prdfIntervalThresholdResolution.h -*********************************************************************/ -/********************************************************************/ diff --git a/src/usr/diag/prdf/framework/resolution/prdfPluginCallResolution.H b/src/usr/diag/prdf/framework/resolution/prdfPluginCallResolution.H deleted file mode 100755 index 80e1e2a1f..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfPluginCallResolution.H +++ /dev/null @@ -1,81 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfPluginCallResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2005,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 __PRDFPLUGINCALLRESOLUTION_H -#define __PRDFPLUGINCALLRESOLUTION_H - -#include <iipResolution.h> -#include <prdfExtensibleChip.H> -#include <prdfPluginDef.H> - -class PrdfPluginCallResolution : public Resolution -{ - private: - PrdfExtensibleChip * iv_chip; - PrdfExtensibleChipFunction * iv_function; - - public: - PrdfPluginCallResolution(void) - : iv_chip(NULL), iv_function(NULL) {} - - PrdfPluginCallResolution(PrdfExtensibleChip * i_chip, - PrdfExtensibleChipFunction * i_function) - : iv_chip(i_chip), iv_function(i_function) {}; - - PrdfPluginCallResolution & operator=(const PrdfPluginCallResolution & r) - { - iv_chip = r.iv_chip; - iv_function = r.iv_function; - return *this; - } - - bool operator==(const PrdfPluginCallResolution & r) - { - return (iv_chip == r.iv_chip)&&(iv_function == r.iv_function); - } - - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & i_error) - { - if ((NULL == iv_chip) || (NULL == iv_function)) - return -1; - - return (*iv_function) - (iv_chip, - PrdfPluginDef::bindParm<STEP_CODE_DATA_STRUCT&>(i_error) - ); //@pw01 - - }; - -}; - -#endif - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- -------- ------------------------------- -// iawillia initial creation -// F522283 f300 09/27/05 dgilbert add defaut ctor, operator==, operator= -// pw01 F522638 f300 09/27/05 iawillia Fix possible object strip in bindParm. -// End Change Log ***************************************************** - diff --git a/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H b/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H deleted file mode 100755 index 1cb23d358..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H +++ /dev/null @@ -1,129 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfResetThresholdResolution.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2002,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 prdfResetThresholdResolution_H -#define prdfResetThresholdResolution_H -/** - @file prdfResetThresholdResolution.H - @brief Resolution that counts occurrances up to a threshold, then reports and resets - the count and starts counting again. -*/ - -#include <prdfThresholdResolutions.H> -#warning -This is an obsolite part - -#if defined(_OBSOLITE_) -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#ifndef iipResolution_h -#include <iipThresholdResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -/** - ResetThresholdResolution - @par - Resolution that has a threshold and keeps track of how - many times its called. When the threshold is reached, it - tells the service data collector and sends it a mask id, - then resets the threshold count to 0. - @code - enum { thresholdValue = 32, MaskId = 05 }; - ResetThresholdResolution rtr(thresholdValue,MaskId); - Resolution & fr = ResolutionFactory::Access().GetCalloutResolution(HOM_IOHUBCHIP0,MRU_HIGH); - ResolutionMap rm(...); // see ResolutionMap - rm.Add(BIT_LIST_STRING_05,&rtr,&ftr); // Resolution invoked when bit 5 - // is on - callsout callout and - // thresholds at thresholdValue - @endcode -*/ -class ResetThresholdResolution : public ThresholdResolution -{ -public: - /** - ctor - @param thresholdValue, error is reported when count == thresholdValue - @param maskId is send to the service data collector when threshold is reached - @pre none - @post internal count set to zero - @note If another resolution is chained to this one, it is always called reguardless of the count - */ - ResetThresholdResolution(uint16_t thresholdValue, uint32_t mask_id); - - /** - ctor - @param thresholdValue, error is reported when count == thresholdValue - @param maskId is send to the service data collector when threshold is reached - @param Another resolution to call (chained) after this one - @pre none - @post internal count set to zero - @note If another resolution is chained to this one, it is always called reguardless of the count - */ -// ResetThresholdResolution(uint32_t thresholdValue, uint32_t mask_id, Resolution &r); - - // ~ResetThresholdResolution(); compiler default is ok - // copy ctor - Compiler default ok - // Assignment - Compiler default ok - - /** - Resolve this part of the error (increment count) - @param error, Access to ServiceDataCollector @see ServiceDataCollector - @returns [SUCCESS| return code] - @pre none - @post 1) ++count. - 2) if count == threshold then error.service_data->IsAtThreshold() == true and - maskId is sent to serviceDataCollector. - 3)Chained resolution called if one was provided in ctor - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - -private: // functions -private: // Data - -// uint8_t threshold; -// uint8_t count; -// uint16_t maskId; -// Resolution * xRes; -}; - -inline -ResetThresholdResolution::ResetThresholdResolution(uint16_t thresholdValue, uint32_t mask_id) -: ThresholdResolution(thresholdValue,mask_id) -{} - -/* -inline -ResetThresholdResolution::ResetThresholdResolution(uint32_t thresholdValue, - uint32_t mask_id, - Resolution & r) -: Resolution(), threshold(thresholdValue), count(0), maskId(mask_id), xRes(&r) -{} -*/ -#endif -#endif /* xspprdResetThresholdResolution_h */ diff --git a/src/usr/diag/prdf/framework/resolution/prdfResolutionList.H b/src/usr/diag/prdf/framework/resolution/prdfResolutionList.H deleted file mode 100755 index 5c1901788..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfResolutionList.H +++ /dev/null @@ -1,47 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfResolutionList.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2004,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 PRDFRESOLUTIONLIST_H -#define PRDFRESOLUTIONLIST_H -/** - @file prdfResolutionList.H - @brief List of resolutions -*/ -//#include <prdfResolution.H> -#include <iipResolution.h> - -#include<list> - -typedef std::list<Resolution *> prdfResolutionList; - -#define prdfResolution Resolution - -#endif /* PRDFRESOLUTIONLIST_H */ - -// Change Log ***************************************************************** -// -// Flag Reason Vers Date Coder Description -// ---- --------- ----- -------- -------- ------------------------------------ -// dgilbert Initial Creation -// -// End Change Log ************************************************************* diff --git a/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.C b/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.C deleted file mode 100755 index cb6dec7b5..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.C +++ /dev/null @@ -1,381 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfResolutionMap.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2004,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 */ - -/** @file prdfResolutionMap.C - * @brief prdfResolutionMap definition - */ - -//------------------------------------------------------------------------------ -// Includes -//------------------------------------------------------------------------------ - -#define prdfResolutionMap_C - -#include <string.h> - -#include <prdfResolutionMap.H> -#include <iipstep.h> -#include <iipServiceDataCollector.h> -#include <prdfErrorSignature.H> -#include <prdfMain.H> - -#undef prdfResolutionMap_C - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_res ) -{ - MapList::iterator i = iv_list.begin(); - while(i != iv_list.end()) - { - if (i->iv_blist == prdfBitKey()) // If empty bit string, skip. - { - } - else if( (i->iv_res == i_res) || (*(i->iv_res) == *i_res)) - { - i->iv_blist.setBit(i_bitPos); - break; - } - ++i; - } - if(i == iv_list.end()) - { - if(iv_list.capacity() == iv_list.size()) - { - iv_list.reserve(iv_list.size() + 10); - } - iv_list.push_back( RmPair(i_bitPos,i_res) ); - } -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add( uint8_t i_bitPos, prdfResolution * i_r1, - prdfResolution * i_r2 ) -{ - Add(i_bitPos,i_r1); - Add(i_bitPos,i_r2); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_r1, - prdfResolution * i_r2, - prdfResolution * i_r3) -{ - Add(i_bitPos,i_r1,i_r2); - Add(i_bitPos,i_r3); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_r1, - prdfResolution * i_r2, - prdfResolution * i_r3, - prdfResolution * i_r4) -{ - Add(i_bitPos,i_r1,i_r2); - Add(i_bitPos,i_r3,i_r4); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_r1, - prdfResolution * i_r2, - prdfResolution * i_r3, - prdfResolution * i_r4, - prdfResolution * i_r5) -{ - Add(i_bitPos,i_r1,i_r2,i_r3); - Add(i_bitPos,i_r4,i_r5); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_r1, - prdfResolution * i_r2, - prdfResolution * i_r3, - prdfResolution * i_r4, - prdfResolution * i_r5, - prdfResolution * i_r6) -{ - Add(i_bitPos,i_r1,i_r2,i_r3); - Add(i_bitPos,i_r4,i_r5,i_r6); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(uint8_t i_bitPos, - prdfResolution * i_r1, - prdfResolution * i_r2, - prdfResolution * i_r3, - prdfResolution * i_r4, - prdfResolution * i_r5, - prdfResolution * i_r6, - prdfResolution * i_r7) -{ - Add(i_bitPos,i_r1,i_r2,i_r3); - Add(i_bitPos,i_r4,i_r5,i_r6,i_r7); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add( const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * i_res ) -{ - MapList::iterator i = iv_list.begin(); - while(i != iv_list.end()) - { - if ((i->iv_blist == prdfBitKey()) || (0 == i_bleLen)) - { - // Empty bit string, skip. - } - else if( (i->iv_res == i_res) || (*(i->iv_res) == *i_res)) - { - for(uint32_t j = 0; j < (uint32_t)i_bleLen; ++j) - { - i->iv_blist.setBit(i_ble[j]); - } - break; - } - ++i; - } - if(i == iv_list.end()) - { - RmPair rmp; - rmp.iv_res = i_res; - for(uint32_t j = 0; j < (uint32_t)i_bleLen; ++j) - { - rmp.iv_blist.setBit(i_ble[j]); - } - if(iv_list.capacity() == iv_list.size()) - { - iv_list.reserve(iv_list.size() + 10); - } - iv_list.push_back(rmp); - } -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * r1, - prdfResolution * r2) -{ - Add(i_ble,i_bleLen,r1); - Add(i_ble,i_bleLen,r2); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3) -{ - Add(i_ble,i_bleLen,r1,r2); - Add(i_ble,i_bleLen,r3); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4) -{ - Add(i_ble,i_bleLen,r1,r2); - Add(i_ble,i_bleLen,r3,r4); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4, - prdfResolution * r5) -{ - Add(i_ble,i_bleLen,r1,r2); - Add(i_ble,i_bleLen,r3,r4,r5); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const uint8_t *i_ble, - uint8_t i_bleLen, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4, - prdfResolution * r5, - prdfResolution * r6) -{ - Add(i_ble,i_bleLen,r1,r2,r3); - Add(i_ble,i_bleLen,r4,r5,r6); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::LookUp(prdfResolutionList & o_list, - prdfBitKey & io_bitList, - STEP_CODE_DATA_STRUCT & scd) -{ - using namespace PRDF; - uint32_t lsize = o_list.size(); - - if(iv_filter != NULL) - { - iv_filter->Apply(io_bitList); - } - - ErrorSignature * esig = scd.service_data->GetErrorSignature(); - switch(io_bitList.size()) - { - case 0: - esig->setErrCode(PRD_SCAN_COMM_REGISTER_ZERO); - break; - case 1: - esig->setErrCode(io_bitList.getListValue(0)); - break; - default: - for(uint32_t index = 0; index < io_bitList.size(); ++index) - { - esig->setErrCode(io_bitList.getListValue(index)); - } - esig->setErrCode(PRD_MULTIPLE_ERRORS); - }; - - for(MapList::iterator i = iv_list.begin(); i != iv_list.end(); ++i) - { - if((i->iv_blist).isSubset(io_bitList)) - { - o_list.push_back(i->iv_res); - } - } - if(lsize == o_list.size()) // we didn't find anything to add, so use default - { - o_list.push_back(defaultRes); - } - - if(iv_filter != NULL) - { - iv_filter->Undo(io_bitList); // so returned bit list will have proper - // value for reset - } -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add( const char *i_ble, - prdfResolution * res ) -{ - uint8_t len = strlen(i_ble); - uint8_t * bl = new uint8_t[len]; - for(uint8_t i = 0; i < len; ++i) - { - bl[i] = (uint8_t)(i_ble[i] - 1); - } - Add(bl,len,res); - delete [] bl; -} - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2) -{ - Add(i_ble,r1); - Add(i_ble,r2); -} - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3) -{ - Add(i_ble,r1,r2); - Add(i_ble,r3); -} - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4) -{ - Add(i_ble,r1,r2); - Add(i_ble,r3,r4); -} - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4, - prdfResolution * r5) -{ - Add(i_ble,r1,r2); - Add(i_ble,r3,r4,r5); -} - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4, - prdfResolution * r5, - prdfResolution * r6) - -{ - Add(i_ble,r1,r2,r3); - Add(i_ble,r4,r5,r6); -} - -//------------------------------------------------------------------------------ - -void prdfResolutionMap::Add(const char *i_ble, - prdfResolution * r1, - prdfResolution * r2, - prdfResolution * r3, - prdfResolution * r4, - prdfResolution * r5, - prdfResolution * r6, - prdfResolution * r7) - -{ - Add(i_ble,r1,r2,r3); - Add(i_ble,r4,r5,r6,r7); -} - diff --git a/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.H b/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.H deleted file mode 100755 index c0864d52b..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfResolutionMap.H +++ /dev/null @@ -1,258 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfResolutionMap.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2004,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 */ - -/*! /file prdfResolutionMap.H - * /brief Map Bit List encodings to Resolutions - */ -#ifndef prdfResolutionMap_h -#define prdfResolutionMap_h -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#include <vector> -#include <prdfBitKey.H> -#include <prdfResolutionList.H> -#include <prdfFilters.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -struct STEP_CODE_DATA_STRUCT; //dg04c -//! prdfResolutionMap -/*! - This class prvodes mapping of a bitList key to a resolution list - @code - Callout callout = { PU0_HIGH , MSCTLR0_HIGH } ; - FinalResolution default_resolution(&callout); - FinalResolution error_type1(&callout); - ResolutionMap Resolutions(expected_size=10,&default_resolution); - Resolutions.Add(BIT_LIST_STRING_15,&error_type1); // Add resolution for error bit 15 - //... - foo(ScanCommRegister *scr, ResolutionMap &rm, STEP_CODE_DATA_STRUCT & error_data) - { - scr->Read(); - BIT_LIST_CLASS bl = *scr->GetBitString(); - Resolution & r = rm.LookUp(bl); - r.Resolve(error_data); - } - @endcode -*/ -class prdfResolutionMap -{ -public: - /** - Constructor - @param entryCount expected (estimated) number of entries - @param defaultResolution Resolution of use if LookUp failes - @param ptr to a filter to apply to the bitKey before it is looked up - @pre None - @post Object created & space reserved - */ - prdfResolutionMap(int32_t entryCount, prdfResolution &defaultResolution, prdfFilter * i_fltr = NULL); - - /* - Destructor - compiler default is ok - */ - //~prdfprdfResolutionMap(); - - // DRGDRG - Should we be returning a ResolutionList? or get rid of Default & use no bits on key??? - /** - Get the default resolution for this map - @returns a reference to the default resolution - @pre None - @post None - */ - prdfResolution & GetDefault(void) const; - - /** - Replace the default Resolution - @param Reference to new default resolution - */ - void ReplaceDefaultWith(prdfResolution & r); - - /** - Add a key,Resolution pair - @param i_bitPos - bit position - @param 1 to 6 Resolutions - */ - void Add(uint8_t i_bitPos, - prdfResolution * i_res ); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2, prdfResolution * i_r3); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2, prdfResolution * i_r3, - prdfResolution * i_r4); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2, prdfResolution * i_r3, - prdfResolution * i_r4, prdfResolution * i_r5); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2, prdfResolution * i_r3, - prdfResolution * i_r4, prdfResolution * i_r5, prdfResolution * i_r6); - void Add(uint8_t i_bitPos, - prdfResolution * i_r1, prdfResolution * i_r2, prdfResolution * i_r3, - prdfResolution * i_r4, prdfResolution * i_r5, prdfResolution * i_r6, - prdfResolution * i_r7); - - /** - Add a key,prdfResolution pair - @param i_ble - bit list encoding (array of bitPos) - @param i_bleLen length of bit list - @param 1 to 6 prdfResolutions - */ - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * res ); - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * r1, prdfResolution * r2); - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3); - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4); - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5); - void Add(const uint8_t *i_ble, uint8_t i_bleLen, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5, prdfResolution * r6); - - - //! Old Add interface - /*! - */ - void Add(const char *i_ble, - prdfResolution * res ); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5, prdfResolution * r6); - void Add(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5, prdfResolution * r6, - prdfResolution * r7); - - void AddRange(const char *i_ble,prdfResolution * res ) { Add(i_ble,res); } - void AddRange(const char *i_ble,prdfResolution * r1, prdfResolution * r2) { Add(i_ble,r1,r2); } - void AddRange(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3) { Add(i_ble,r1,r2,r3); } - void AddRange(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4) { Add(i_ble,r1,r2,r3,r4); } - void AddRange(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5) { Add(i_ble,r1,r2,r3,r4,r5); } - void AddRange(const char *i_ble, - prdfResolution * r1, prdfResolution * r2, prdfResolution * r3, - prdfResolution * r4, prdfResolution * r5, prdfResolution * r6) { Add(i_ble,r1,r2,r3,r4,r5,r6); } - /** - Look up a prdfResolution for a bitlist - @param bitList - @returns List of all prdfResolutions that match - @pre none - @post prdfResolution returned is only valid until the next call to LookUp or this object is destroyed. - i_bitList may be modified - @notes if the bitList does not have a match then the defaultprdfResolution is returned. - */ - void LookUp(prdfResolutionList & o_list, prdfBitKey & io_bitList, STEP_CODE_DATA_STRUCT & scd); //dg04c - - /** - * @brief Get the stored filter associated with this resolution map. - * @returns Currently assigned filter. - */ - prdfFilter * getFilter() { return iv_filter; }; - - /** - * @brief Store a new filter with this resolution map. - * @param i - Filter to store. - */ - void setFilter(prdfFilter * i) { iv_filter = i; }; - -protected: // functions - -private: // functions - - /*! - Copy prohibited - */ - prdfResolutionMap(const prdfResolutionMap &); // Don't allow copy - No defn - - /*! - Assignment prohibited - */ - const prdfResolutionMap &operator=(const prdfResolutionMap &); // Don't allow - no defn - -private: // Data - - struct RmPair - { - prdfBitKey iv_blist; - prdfResolution * iv_res; - RmPair(uint8_t i_bitPos, prdfResolution *res) : iv_blist(i_bitPos), iv_res(res) {} - RmPair(void) : iv_blist(), iv_res(NULL) {} - }; - - typedef std::vector<RmPair> MapList; - - prdfResolution * defaultRes; - prdfFilter * iv_filter; - - MapList iv_list; -// MapList iv_rangeList; - -}; - -inline prdfResolutionMap::prdfResolutionMap(int32_t entryCount, - prdfResolution & defaultResolution, - prdfFilter * i_fltr) -: defaultRes(&defaultResolution), iv_filter(i_fltr), iv_list() -{ - iv_list.reserve(entryCount); -} - -inline prdfResolution & prdfResolutionMap::GetDefault(void) const {return *defaultRes; } -inline void prdfResolutionMap::ReplaceDefaultWith(prdfResolution & r) { defaultRes = &r; } - -#endif /* prdfResolutionMap_h */ - -// Change Log ************************************************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ------- -------- -------- ------------------------------------------------------- -// v4r1mo 05/02/96 DRG Initial Creation -// D49203.5 v4r3 07/30/97 DRG Add Add() for multiple resolutions -// fips 03/02/04 dgilbert Changes the way lookups are done -// 482244 fips225 11/04/04 dgilbert Add filter -// F544848 f300 04/03/06 iawillia Add multi-bit support for rule code -// dg04 568068 f310 08/29/06 dgilbert Add STEP_CODE_DATA_STRUCT to LookUp -// End Change Log ********************************************************************************* diff --git a/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.C b/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.C deleted file mode 100755 index 24c167c06..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.C +++ /dev/null @@ -1,259 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2003,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 */ - -/** - @file prdfThresholdResolutions.C - @brief MaskResolution, IntervalThresholdResolution, ResetThresholdResolution -*/ -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define prdfThresholdResolutions_C - -#include <iipServiceDataCollector.h> -#include <prdfTimer.H> -#include <prdfFlyWeight.H> -#include <prdfThresholdResolutions.H> -#include <prdfFlyWeight.C> - -#undef prdfThresholdResolutions_C -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Global Variables -//---------------------------------------------------------------------- - -// This is global varaible for stroring threshold policy instances. -// It must be cleared in prdf uninitialize -FlyWeight<ThresholdResolution::ThresholdPolicy, 10> g_thresholdPFW; - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -const ThresholdResolution::ThresholdPolicy ThresholdResolution::cv_fieldDefault - = g_thresholdPFW.get( - ThresholdResolution::ThresholdPolicy(32,ThresholdResolution::ONE_DAY)); - -const ThresholdResolution::ThresholdPolicy ThresholdResolution::cv_mnfgDefault - = g_thresholdPFW.get( - ThresholdResolution::ThresholdPolicy(1,ThresholdResolution::NONE)); - -const ThresholdResolution::ThresholdPolicy ThresholdResolution::cv_pllDefault - = g_thresholdPFW.get( - ThresholdResolution::ThresholdPolicy(2,ThresholdResolution::ONE_MIN)); - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -int32_t MaskResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - error.service_data->SetHits(1); - error.service_data->SetThreshold(1); - error.service_data->SetThresholdMaskId(iv_maskId); - return SUCCESS; -} - -//--------------------------------------------------------------------- - -int32_t MaskResolution::GetCount() // wl01 -{ - return 1; -} - -//--------------------------------------------------------------------- - -void MaskResolution::ResetCount() // wl01 -{ - return; -} - -//--------------------------------------------------------------------- - -ThresholdResolution::ThresholdResolution( uint32_t maskId, - uint8_t i_threshold, - uint32_t i_interval ) : - MaskResolution(maskId), - iv_policy( &g_thresholdPFW.get(ThresholdPolicy(i_threshold,i_interval))), - iv_count(0) -{} - -//--------------------------------------------------------------------- - -ThresholdResolution::ThresholdResolution() : - MaskResolution(0), - iv_policy( &(ThresholdResolution::cv_fieldDefault)), - iv_count(0) -{} - -//--------------------------------------------------------------------- - -ThresholdResolution::ThresholdResolution( uint32_t maskId, - const ThresholdPolicy& thresholdp ) : - MaskResolution(maskId), - iv_policy(&g_thresholdPFW.get(thresholdp)), - iv_count(0) -{} - -//--------------------------------------------------------------------- - -int32_t ThresholdResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - int32_t rc = SUCCESS; - PrdTimer curTime = error.service_data->GetTOE(); // get timestamp (Time Of Error) from SDC - ++iv_count; - error.service_data->SetHits((uint8_t)iv_count); - error.service_data->SetThreshold((uint8_t)iv_policy->threshold); - if (iv_count == 1) // Interval begins at the 1st occurrence - { - iv_endTime = curTime + iv_policy->interval; // Project the end of interval (in sec) - if((iv_count == iv_policy->threshold) || - (error.service_data->IsFlooding())) // We've hit threshold within the interval - { - error.service_data->SetThresholdMaskId(iv_maskId); // threshold, degraded YES - iv_count = 0; // Reset the counter on threshold - } - } - else - { - if (curTime > iv_endTime) // Are we already past the time window? - { - iv_count = 1; // Reset count as if it were the first - error.service_data->SetHits((uint8_t)iv_count); // pw01 - iv_endTime = curTime + iv_policy->interval; // Project the new end of interval - } - else if((iv_count == iv_policy->threshold) || - (error.service_data->IsFlooding())) // We've hit threshold within the interval - { - error.service_data->SetThresholdMaskId(iv_maskId); // threshold, degraded YES - iv_count = 0; // Reset the counter on threshold - } - else ; // Nothing else - } - - return rc; -} - -//--------------------------------------------------------------------- - -void ThresholdResolution::ResetCount() // wl01 -{ - iv_count = 0; - return; -} - -//--------------------------------------------------------------------- - -int32_t ThresholdResolution::GetCount() // wl01 -{ - return iv_count; -} - -//--------------------------------------------------------------------- - -void ThresholdResolution::reset() -{ - g_thresholdPFW.clear(); -} - -//--------------------------------------------------------------------- - -ThresholdSigResolution::ThresholdSigResolution( uint8_t i_threshold, - uint32_t i_interval ) : - iv_policy( &g_thresholdPFW.get( - ThresholdResolution::ThresholdPolicy(i_threshold,i_interval))) -{} - -//--------------------------------------------------------------------- - -ThresholdSigResolution::ThresholdSigResolution( - const ThresholdResolution::ThresholdPolicy & policy ) : - iv_policy( &g_thresholdPFW.get(policy)) -{} - -//--------------------------------------------------------------------- - -ThresholdSigResolution::ThresholdSigResolution() : - iv_policy( &(ThresholdResolution::cv_fieldDefault)) -{} - -//--------------------------------------------------------------------- - -int32_t ThresholdSigResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - int32_t l_rc = SUCCESS; - - PrdTimer l_curTime = error.service_data->GetTOE(); - ErrorSignature l_sig = *error.service_data->GetErrorSignature(); - ThresholdCountAndTimer & l_countTime = iv_thresholds[l_sig]; - - uint32_t l_count = ++(l_countTime.first); // increment count. - - // update service data with threshold info. - error.service_data->SetHits((uint8_t) l_count); - error.service_data->SetThreshold((uint8_t)iv_policy->threshold); - - if (1 == l_count) // first time: set end timer. - { - l_countTime.second = l_curTime + iv_policy->interval; - if ((l_countTime.first == iv_policy->threshold) || - (error.service_data->IsFlooding())) - { - // set overthreshold flag / maskid, clear count. - error.service_data->SetThresholdMaskId(l_sig.getSigId()); - l_countTime.first = 0; - } - } - else - { - if (l_curTime > l_countTime.second) // time > interval: reset end timer - { - l_countTime.first = 1; - error.service_data->SetHits((uint8_t)l_countTime.first); // pw01 - l_countTime.second = l_curTime + iv_policy->interval; - } - // Check over threshold and under time interval. - else if ((l_countTime.first == iv_policy->threshold) || - (error.service_data->IsFlooding())) - { - // set overthreshold flag / maskid, clear count. - error.service_data->SetThresholdMaskId(l_sig.getSigId()); - l_countTime.first = 0; - } - else; // nothing else. - } - - return l_rc; -} diff --git a/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.H b/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.H deleted file mode 100755 index 7bccc7c62..000000000 --- a/src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.H +++ /dev/null @@ -1,278 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/prdfThresholdResolutions.H $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2003,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 PRDFTHRESHOLDRESOLUTIONS_H -#define PRDFTHRESHOLDRESOLUTIONS_H -/** - @file prdfThresholdResolutions.H - @brief MaskResolution, IntervalThresholdResolution, ResetThresholdResolution -*/ - - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#if !defined(PRDFTIMER_H) -#include <time.h> -#include <prdfTimer.H> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- - -/** - Set mask Resolution - @author Doug Gilbert - @par - @code - @endcode - */ -class MaskResolution: public Resolution -{ - public: - /** - Constructor - @param Maskid - */ - MaskResolution(uint32_t maskId) : iv_maskId(maskId) {} - - /** - Default Ctor - so it can be used in a vector - */ - MaskResolution(void) : iv_maskId(0) {} - - /** - Set MaskId into service data collector - @pre None - @post - @return SUCCESS | non-zero - @note Acts like Threshold Resolution with a threshold of one - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - virtual void ResetCount(); // wl01 - - virtual int32_t GetCount(); // wl01 - - /** - operator == - */ - bool operator==(const MaskResolution &r) { return (iv_maskId == r.iv_maskId); } //dg02 - - private: // functions - protected: // Data - uint32_t iv_maskId; - -}; - -/** - Set Mask on Threshold - */ -class ThresholdResolution : public MaskResolution -{ - public: - - enum TimeBase - { - ONE_SEC = 1, - ONE_MIN = ONE_SEC * 60, - ONE_HOUR = ONE_MIN * 60, - ONE_DAY = ONE_HOUR * 24, - - NONE = 0xffffffff, - }; - - struct ThresholdPolicy - { - // Currently we don't need threshold value more then 255. So using - // uint8_t here to save space. - uint8_t threshold; - uint32_t interval; - - ThresholdPolicy( uint8_t l_threshold, uint32_t l_interval ) : - threshold(l_threshold), interval(l_interval) - {} - - ThresholdPolicy() : - threshold(0), interval(0) - {} - - bool operator==(ThresholdPolicy i_thr) const - { - return ( (threshold == i_thr.threshold) && - (interval == i_thr.interval) ); - } - }; - - /** - Constructor - @param maskid - @param i_threshold - @param i_interval - */ - ThresholdResolution(uint32_t maskId, uint8_t i_threshold, uint32_t i_interval); - - /** - default Ctor - so it can be used in a vector - */ - ThresholdResolution(void); - - /** - Constructor - @param thresholdp Threshold policy. - */ - ThresholdResolution(uint32_t maskId, - const ThresholdPolicy& thresholdp); - - /** - Set MaskId into service data collector when a threshold as been reached - @pre None - @post Increment thresholdCount - Maskid is set in ServiceData when threshold is reached - @return SUCCESS | non-zero - @note In mfg mode the threshold is one - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - virtual void ResetCount(); // wl01 - - virtual int32_t GetCount(); // wl01 - - /** - operator == - @note This should always return false in order for FlyWeight to always create unique objects - */ - bool operator==(const ThresholdResolution &r) { return false; } - - /** - * Clear out all threshold policy objects - */ - static void reset(); - - public: // Data - - static const ThresholdPolicy cv_fieldDefault; - static const ThresholdPolicy cv_mnfgDefault; - static const ThresholdPolicy cv_pllDefault; - - private: // Data - - // Though this is a pointer, we should never free it in destructor - //We take its value from global flyweight which will be freed in prd uninitialise - const ThresholdPolicy * iv_policy; - uint32_t iv_count; - PrdTimer iv_endTime; - -}; - -/** - * @class ThresholdSigResolution - * - * Similar to the ThresholdResoultion, except it uses the current error - * signature in the SDC to determine the 'maskid'. This allows us to use one - * ThresholdSigResolution class for each policy instead of one - * ThresholdResolution for each error for each chip. - */ -#include <map> -#include <prdfErrorSignature.H> -class ThresholdSigResolution: public Resolution -{ - public: - - /** ctor(ThresholdPolicyEnum policy) - * Initializes the policy to the value specified. - */ - ThresholdSigResolution( uint8_t i_threshold, uint32_t i_interval); - - /** ctor(ThresholdPolicy* policy) - * Initializes the policy to the policy specified. - */ - ThresholdSigResolution(const ThresholdResolution::ThresholdPolicy& policy); - - /** default ctor - * Initialize the policy to "Default". - */ - ThresholdSigResolution(); - - /** default dtor - * Does nothing special. - */ - virtual ~ThresholdSigResolution() {}; - - /** Resolve - * Increments the error count based on the current signature. If - * 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); - - /** operator== - * Compare two ThresholdSigResolutions by policies. - */ - bool operator==(const ThresholdSigResolution &r) - { - return ( (r.iv_policy->threshold == iv_policy->threshold) && - (r.iv_policy->interval == iv_policy->interval) ); - } - - /** Flush - * Clear out all error counts recorded for all signatures. - */ - virtual void Flush() { iv_thresholds.empty(); }; - - private: - - // Stores a count/timer pair. - typedef std::pair<uint32_t, PrdTimer> ThresholdCountAndTimer; - - // Policy for this object. - // Though this is a pointer, we should never free it in destructor - // We take its value from global flyweight which will be freed in prd uninitialise - const ThresholdResolution::ThresholdPolicy * iv_policy; - - // Map of ErrorSignatures->(Count,Timer). - std::map<ErrorSignature, ThresholdCountAndTimer> iv_thresholds; - -}; - -#endif /* PRDFTHRESHOLDRESOLUTIONS_H */ - -// Change Log ***************************************************************** -// -// Flag Reason Vers Date Coder Description -// ---- ------- ------- -------- -------- ------------------------------------ -// 400647 dgilbert Initial Creation -// wl01 406274 fips 06/27/03 lemmon add support for ThresholdResolution GetCount and ResetCount -// dg02 487035 fips222 12/10/04 dgilbert add operator== to MaskResolution -// 507223 fips310 06/03/05 iawillia Add ThresholdSigResolution -// D515833 fips300 09/19/05 iawillia Use VMap instead of Map. -// F522128 fips300 09/22/05 iawillia Add TwoPerDay policy. -// F523599 fips300 10/11/05 iawillia Add ThirtyThreePerHalfHour policy. -// F548507 fips300 04/21/06 iawillia Add FivePerDay policy. -// zs01 F565934 fips310 08/25/06 zshelle Add SixteenPerDay policy. -// End Change Log ************************************************************* diff --git a/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.C b/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.C deleted file mode 100755 index 2e9457931..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.C +++ /dev/null @@ -1,55 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 */ - -// Module Description ************************************************** -// -// Description: -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define xspprdDumpResolution_C - -#include <xspprdDumpResolution.h> -#include <iipServiceDataCollector.h> - -#undef xspprdDumpResolution_C - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -int32_t DumpResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - uint32_t rc = SUCCESS; - - #ifdef __HOSTBOOT_MODULE - error.service_data->SetDump(/*FIXME: ivDumpContent,*/ iv_pdumpHandle); - #else - error.service_data->SetDump(ivDumpContent,iv_pdumpHandle); - #endif - - return rc; -} diff --git a/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.h b/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.h deleted file mode 100755 index f8749f1ec..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.h +++ /dev/null @@ -1,137 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdDumpResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 xspprdDumpResolution_h -#define xspprdDumpResolution_h -// Class Description ************************************************* -// -// Name: DumpResolution -// Base class: Resolution -// -// Description: Set dump information in Service Data Collector -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#ifndef __HOSTBOOT_MODULE - -#include <hdctContent.H> - -#endif - -#include <prdfPlatServices.H> - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -class ServiceDataCollector; - -/** - Set dump information in the Service Data Collector - @author Mike Kobler - */ -class DumpResolution : public Resolution -{ -public: - /** - Constructor - <ul> - <br><b>Parameters: </b> Optional: Processor handle value - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - #ifdef __HOSTBOOT_MODULE - DumpResolution(/*FIXME: hwTableContent iDumpRequestContent = CONTENT_HW, */ - TARGETING::TargetHandle_t i_pdumpHandle =NULL ) : - #else - DumpResolution(hwTableContent iDumpRequestContent = CONTENT_HW, - TARGETING::TargetHandle_t i_pdumpHandle =NULL ) : - ivDumpContent(iDumpRequestContent), - #endif - iv_pdumpHandle(i_pdumpHandle) - {} - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default sufficient - </ul><br> - */ - // ~xspprdDumpResolution(); - - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryDump() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - -#ifndef __HOSTBOOT_MODULE - - /* - * base class defines operator== so one is needed here - * or the base class version will be used (bad) - */ - bool operator==(const DumpResolution & r) const - { - return ( (ivDumpContent == r.ivDumpContent) && - (iv_pdumpHandle == r.iv_pdumpHandle) ); - } - -#endif - -private: // functions -private: // Data - - #ifndef __HOSTBOOT_MODULE - hwTableContent ivDumpContent; - #endif - - TARGETING:: TargetHandle_t iv_pdumpHandle; -}; - - -#endif /* xspprdDumpResolution_h */ - diff --git a/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.C b/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.C deleted file mode 100755 index 7331bf728..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.C +++ /dev/null @@ -1,57 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 */ - -// Module Description ************************************************** -// -// Description: -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define xspprdFlagResolution_C - -#include <xspprdFlagResolution.h> -#include <iipServiceDataCollector.h> - -#undef xspprdFlagResolution_C - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -int32_t FlagResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - uint32_t rc = SUCCESS; - error.service_data->SetFlag(xFlag); - return rc; -} - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- -------- ------------------------------ -// D49420.9 V5R2 12/04/00 mkobler Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.h b/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.h deleted file mode 100755 index 876b25e2f..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.h +++ /dev/null @@ -1,124 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdFlagResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 xspprdFlagResolution_h -#define xspprdFlagResolution_h - -// Class Description ************************************************* -// -// Name: FlagResolution -// Base class: Resolution -// -// Description: Set a Flag in the Service Data Collector -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -#if !defined(iipServiceDataCollector_h) -#include <iipServiceDataCollector.h> -#endif - -/** - Set a Flag in the Service Data Collector - @author Mike Kobler - */ -class FlagResolution : public Resolution -{ -public: - /** - Constructor - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - FlagResolution(ServiceDataCollector::Flag flag) - : xFlag(flag) {} - FlagResolution() - : xFlag(ServiceDataCollector::SERVICE_CALL) {} - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default sufficient - </ul><br> - */ - // ~xspprdFlagResolution(); - - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryFlag() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - /* - * base class defines operator== so one is needed here - * or the base class version will be used (bad) - */ - bool operator==(const FlagResolution & r) const - { - return (xFlag == r.xFlag); - } - -private: // functions -private: // Data - - ServiceDataCollector::Flag xFlag; - -}; - - -#endif /* xspprdFlagResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ------- ------------------------------- -// D49420.9 V5R2 12/04/00 mkobler Initial Creation -// f522283 300 09/27/05 dgilbert make FlyWeight-able -// D608564 f310 05/18/07 dgilbert add operator==() to fix mem leak -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.C b/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.C deleted file mode 100755 index 483c18eb2..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.C +++ /dev/null @@ -1,75 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdGardResolution.C $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1999,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 */ - -// Module Description ************************************************** -// -// Description: -// -// End Module Description ********************************************** - -//---------------------------------------------------------------------- -// Includes -//---------------------------------------------------------------------- -#define xspprdGardResolution_C - -#include <xspprdGardResolution.h> -#include <iipServiceDataCollector.h> - -#undef xspprdGardResolution_C -//---------------------------------------------------------------------- -// User Types -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Constants -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Macros -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Internal Function Prototypes -//---------------------------------------------------------------------- - -//---------------------------------------------------------------------- -// Global Variables -//---------------------------------------------------------------------- - -//--------------------------------------------------------------------- -// Member Function Specifications -//--------------------------------------------------------------------- - -int32_t GardResolution::Resolve(STEP_CODE_DATA_STRUCT & error) -{ - error.service_data->Gard(xErrorType); - return SUCCESS; -} - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- -------- ------------------------------ -// DGILBERT Initial Creation -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.h b/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.h deleted file mode 100755 index 70ae9d727..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdGardResolution.h +++ /dev/null @@ -1,141 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdGardResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 2001,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 xspprdGardResolution_h -#define xspprdGardResolution_h - -// Class Description ************************************************* -// -// Name: GardResolution -// Base class: Resolution -// -// Description: Set the error type for the failure (determines whether -// Gard will be called) -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- - -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -/** - Callout a mru and mark it for Gard (deallocation) - @author Doug Gilbert - */ -class GardResolution : public Resolution -{ -public: - - enum ErrorType - { - // No Gard is possible - NoGard = 0, - // Recovered error at threshold - Predictive = 1, - // An uncorrectable error occurred, but the machine continues to run - Uncorrectable = 2, - // Checkstop, failing resources can be removed to prevent future occurances - Fatal = 3, - // Resource has spares that could be used to fix the problem via bist on the next IPL. - Pending = 4, - // This is NoGard unless attn type is CheckStop, then it is Fatal (Func) - CheckStopOnlyGard = 5, //mp01 - //This is to allow Deferred Deconfig, with No Garding - DeconfigNoGard = 6 //mp02 - }; - - - /** - Constructor - <ul> - <br><b>Parameters: </b> None - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - GardResolution(ErrorType et=NoGard) - : xErrorType(et) {} - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default sufficient - </ul><br> - */ - // ~xspprdGardResolution(); - - /** - Resolve by adding a the MRU callout to the service data collector - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> serviceData::GetMruList().GetCount()++ - serviceData::QueryGard() == this callout - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - - bool operator==(const GardResolution & r) const - { - return (xErrorType == r.xErrorType); - } - -private: // functions -private: // Data - - ErrorType xErrorType; - -}; - - -#endif /* xspprdGardResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- -------- ---- -------- ----- ------------------------------- -// 02/18/99 DRG Initial Creation -// D49420.8 v5r2 12/05/00 mak Change to use PRDcallout -// 05/18/07 drg add operator==() to prevent memory leak -// mp01 D672610 f320 08/28/08 plute Add CheckStopOnlyGard -// mp02 f710 08/06/08 plute Add DeconfigNoGard -// -// End Change Log ***************************************************** diff --git a/src/usr/diag/prdf/framework/resolution/xspprdTryResolution.h b/src/usr/diag/prdf/framework/resolution/xspprdTryResolution.h deleted file mode 100755 index c9f4dd5e1..000000000 --- a/src/usr/diag/prdf/framework/resolution/xspprdTryResolution.h +++ /dev/null @@ -1,134 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/usr/diag/prdf/framework/resolution/xspprdTryResolution.h $ */ -/* */ -/* IBM CONFIDENTIAL */ -/* */ -/* COPYRIGHT International Business Machines Corp. 1998,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 xspprdTryResolution_h -#define xspprdTryResolution_h - -// Class Description ************************************************* -// -// Name: TryResolution -// Base class: Resolution -// -// Description: Try a resolution - if it does not work then -// call a default resolution -// Usage: -// -// End Class Description ********************************************* - -//-------------------------------------------------------------------- -// Includes -//-------------------------------------------------------------------- -#if !defined(iipResolution_h) -#include <iipResolution.h> -#endif - -//-------------------------------------------------------------------- -// Forward References -//-------------------------------------------------------------------- -/** - **One line Class description** - @author Doug Gilbert - */ -class TryResolution: public Resolution -{ -public: - /** - Constructor - <ul> - <br><b>Parameter: </b> Resolution to try first - <br><b>Parameter: </b> Resolution if the try resolution fails - <br><b>Returns: </b> Nothing - <br><b>Requirements:</b> None - <br><b>Promises: </b> Object created - <br><b>Exceptions: </b> None - <br><b>Notes: </b> - </ul><br> - */ - TryResolution(Resolution &tryRes, Resolution & defaultRes); - TryResolution(); - - /* - Destructor - <ul> - <br><b>Parameters: </b> None. - <br><b>Returns: </b> No value returned - <br><b>Requirements:</b> None. - <br><b>Promises: </b> None. - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> Compiler default is sufficient - </ul><br> - */ - // ~TryResolution(); - - /** - ** description ** - <ul> - <br><b>Parameters: </b> parms - <br><b>Returns: </b> return - <br><b>Requirements:</b> preconditions - <br><b>Promises: </b> postconditions - <br><b>Exceptions: </b> None. - <br><b>Notes: </b> optional - </ul><br> - */ - - /** - Resolve by calling TryResolution else call DefaultResolution - <ul> - <br><b>Parameters: </b> ServiceDataCollector - <br><b>Returns: </b> Return code [SUCCESS | nonZero] - <br><b>Requirements:</b> none. - <br><b>Promises: </b> if(TryResolution.Resolve() != SUCCESS) - then xDefaultResolution.Resolve(); - <br><b>Exceptions: </b> None. - </ul><br> - */ - virtual int32_t Resolve(STEP_CODE_DATA_STRUCT & error); - -private: // functions -private: // Data - -Resolution * xTryResolution; -Resolution * xDefaultResolution; - -}; - -inline -TryResolution::TryResolution(Resolution &tryRes, Resolution & defaultRes) -: xTryResolution(&tryRes), xDefaultResolution(&defaultRes) {} - -inline -TryResolution::TryResolution() - : xTryResolution(NULL), xDefaultResolution(NULL) {} - - -#endif /* xspprdTryResolution_h */ - -// Change Log ********************************************************* -// -// Flag Reason Vers Date Coder Description -// ---- --------- ---- -------- -------- ------------------------------- -// d49274.xx v4r5 12/28/99 dgilbert Initial Creation -// f522283 300 09/27/05 dgilbert Make flyweight-able -// -// End Change Log ***************************************************** |