diff options
| author | Zane Shelley <zshelle@us.ibm.com> | 2013-02-20 11:14:51 -0600 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-04-09 16:59:27 -0500 |
| commit | 9afea9f34838f35e1b4282362e2b6d51b9713eb5 (patch) | |
| tree | 96f6576aef5144f51b3d73d6b60678402500f6a3 /src/usr/diag/prdf/common/framework/resolution | |
| parent | 0cb34beffe6264f670e20a2dea60af0fd5195f7b (diff) | |
| download | blackbird-hostboot-9afea9f34838f35e1b4282362e2b6d51b9713eb5.tar.gz blackbird-hostboot-9afea9f34838f35e1b4282362e2b6d51b9713eb5.zip | |
PRD: Add MemoryMru support
Change-Id: If69a67057290054b42795c874d3716fa3014a785
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3267
Tested-by: Jenkins Server
Reviewed-by: Zane Shelley <zshelle@us.ibm.com>
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3893
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/framework/resolution')
3 files changed, 84 insertions, 57 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C index 935cfee23..a1248bc4f 100755 --- a/src/usr/diag/prdf/common/framework/resolution/iipResolution.C +++ b/src/usr/diag/prdf/common/framework/resolution/iipResolution.C @@ -117,12 +117,10 @@ int32_t CalloutResolution::Resolve( STEP_CODE_DATA_STRUCT & io_serviceData ) reduce memory utilization. */ - if( PRDcallout::TYPE_TARGET == xMruCallout.getType( ) ) + if ( PRDcalloutData::TYPE_TARGET == xMruCallout.getType() ) { - PRDcallout l_targetCallout( - ServiceDataCollector::getTargetAnalyzed( ) ); - - io_serviceData.service_data->SetCallout( l_targetCallout ,xPriority ); + PRDcallout l_targetCallout( ServiceDataCollector::getTargetAnalyzed() ); + io_serviceData.service_data->SetCallout( l_targetCallout, xPriority ); } else { diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H index 1a21a324f..00914dd1c 100755 --- a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H @@ -28,21 +28,11 @@ // Includes //------------------------------------------------------------------------------ -#ifndef __HOSTBOOT_MODULE - -#include <srci.H> - -#endif - #include <prdfCalloutMap.H> +#include <prdfCalloutsData.H> #include <prdfEnums.H> #include <prdfMemoryMru.H> - -#ifdef PRDF_ERRL_PARSER - #include <prdfTargetFwdRef.H> -#else - #include <prdfPlatServices.H> -#endif +#include <prdfPlatServices.H> namespace PRDF { @@ -63,62 +53,53 @@ class PRDcallout { public: - enum MruType - { - TYPE_NONE, - TYPE_TARGET, - TYPE_MEMMRU, - TYPE_SYMFRU, - }; - /** @brief Constructor */ - PRDcallout() : iv_type(TYPE_NONE) + PRDcallout() : iv_type(PRDcalloutData::TYPE_NONE) { iv_meldValue.u32 = 0; } /** @brief Constructor from TargetHandle_t */ - PRDcallout( TARGETING::TargetHandle_t i_target ) : iv_type(TYPE_TARGET) + PRDcallout( TARGETING::TargetHandle_t i_target ) : + iv_type(PRDcalloutData::TYPE_TARGET) { iv_meldValue.target = i_target; } - /** @brief Constructor from PrdfMemoryMru */ - PRDcallout( const PrdfMemoryMru & i_memmru ) : iv_type(TYPE_MEMMRU) + /** @brief Constructor from MemoryMru */ + PRDcallout( const MemoryMru & i_memmru ) : + iv_type(PRDcalloutData::TYPE_MEMMRU) { iv_meldValue.u32 = i_memmru.toUint32(); } /** @brief Constructor from SymbolicFru */ - PRDcallout( SymbolicFru i_symfru ) : iv_type(TYPE_SYMFRU) + PRDcallout( SymbolicFru i_symfru ) : iv_type(PRDcalloutData::TYPE_SYMFRU) { iv_meldValue.symfru = i_symfru; } -#ifndef PRDF_ERRL_PARSER - /** @brief Constructor from raw data */ - PRDcallout( uint32_t i_val, MruType i_type ) : iv_type(i_type) + PRDcallout( uint32_t i_val, PRDcalloutData::MruType i_type ) : + iv_type(i_type) { switch ( iv_type ) { - case TYPE_TARGET: + case PRDcalloutData::TYPE_TARGET: iv_meldValue.target = PlatServices::getTarget(i_val); break; - case TYPE_MEMMRU: - case TYPE_SYMFRU: + case PRDcalloutData::TYPE_MEMMRU: + case PRDcalloutData::TYPE_SYMFRU: iv_meldValue.u32 = i_val; break; default: - iv_type = TYPE_NONE; + iv_type = PRDcalloutData::TYPE_NONE; iv_meldValue.u32 = 0; } } -#endif - /** @brief Assignment from TargetHandle_t */ PRDcallout & operator=( TARGETING::TargetHandle_t i_target ) { - iv_type = TYPE_TARGET; + iv_type = PRDcalloutData::TYPE_TARGET; iv_meldValue.target = i_target; return *this; } - /** @brief Assignment from PrdfMemoryMru */ - PRDcallout & operator=( const PrdfMemoryMru & i_memmru ) + /** @brief Assignment from MemoryMru */ + PRDcallout & operator=( const MemoryMru & i_memmru ) { - iv_type = TYPE_MEMMRU; + iv_type = PRDcalloutData::TYPE_MEMMRU; iv_meldValue.u32 = i_memmru.toUint32(); return *this; } @@ -126,7 +107,7 @@ class PRDcallout /** @brief Assignment from SymbolicFru */ PRDcallout & operator=( SymbolicFru i_symfru ) { - iv_type = TYPE_SYMFRU; + iv_type = PRDcalloutData::TYPE_SYMFRU; iv_meldValue.symfru = i_symfru; return *this; } @@ -139,7 +120,7 @@ class PRDcallout // Otherwise, the single-argument constructors listed above will do // automatic type conversion, which will allow code like this: // - // TargetHandle_t t; PrdfMemoryMru m; + // TargetHandle_t t; MemoryMru m; // if ( t == m ) ... // // The safest way to prevent this is to make all of the single-argument @@ -153,7 +134,7 @@ class PRDcallout { if ( iv_type == r.iv_type ) { - return ( TYPE_TARGET == iv_type ) + return ( PRDcalloutData::TYPE_TARGET == iv_type ) ? iv_meldValue.target == r.iv_meldValue.target : iv_meldValue.u32 == r.iv_meldValue.u32; } @@ -162,36 +143,32 @@ class PRDcallout } /** @brief Returns the callout type. */ - MruType getType() const { return iv_type; } + PRDcalloutData::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); } - -#ifndef PRDF_ERRL_PARSER + /** @returns Returns the MemoryMru. */ + MemoryMru getMemMru() const { return MemoryMru(iv_meldValue.u32); } /** @brief Returns a uint32_t representation of the callout */ uint32_t flatten() const { switch ( iv_type ) { - case TYPE_TARGET: + case PRDcalloutData::TYPE_TARGET: return PlatServices::getHuid(iv_meldValue.target); break; - case TYPE_MEMMRU: - case TYPE_SYMFRU: + case PRDcalloutData::TYPE_MEMMRU: + case PRDcalloutData::TYPE_SYMFRU: return iv_meldValue.u32; break; default: return 0; } } -#endif - private: - MruType iv_type; + PRDcalloutData::MruType iv_type; union { diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H new file mode 100644 index 000000000..f85f6eb3d --- /dev/null +++ b/src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H @@ -0,0 +1,52 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/diag/prdf/common/framework/resolution/prdfCalloutsData.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 2013 */ +/* */ +/* p1 */ +/* */ +/* Object Code Only (OCO) source materials */ +/* Licensed Internal Code Source Materials */ +/* IBM HostBoot Licensed Internal Code */ +/* */ +/* The source code for this program is not published or otherwise */ +/* divested of its trade secrets, irrespective of what has been */ +/* deposited with the U.S. Copyright Office. */ +/* */ +/* Origin: 30 */ +/* */ +/* IBM_PROLOG_END_TAG */ + +/** @file prdfCalloutsData.H + * @brief This is specifically designed to be included in both functional and + * error log parsing code (i.e. must be able to compile in PPC and + * x86.nfp contexts). + */ + +#ifndef __prdfCalloutsData_H +#define __prdfCalloutsData_H + +namespace PRDF +{ + +namespace PRDcalloutData +{ + +enum MruType +{ + TYPE_NONE, + TYPE_TARGET, + TYPE_MEMMRU, + TYPE_SYMFRU, +}; + +} // end namespace PRDcalloutData + +} // end namespace PRDF + +#endif // __prdfCalloutsData_H + |

