summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2014-08-25 18:51:29 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-08-27 16:02:50 -0500
commita0fa16f1a2892a5db2382d7008033f11d3194f42 (patch)
tree3b0b7ad59aa3cd891b69549196f962ab4f30ac52 /src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
parent072c84bc61fb5df6da5986e9ed7b136e01d6ab05 (diff)
downloadtalos-hostboot-a0fa16f1a2892a5db2382d7008033f11d3194f42.tar.gz
talos-hostboot-a0fa16f1a2892a5db2382d7008033f11d3194f42.zip
PRD: add support for raw card C
The raw card type is only needed for DRAM site location information in the error log parser. In addition to adding support for raw card C, I fixed and issue where the functional code will fail if a raw card type is not supported. Change-Id: I0bc2411d6ade118d48eaab33fdeeb54d1c9d2dba CQ: SW275115 Backport: release-fips811 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13000 Reviewed-by: Christopher T. Phan <cphan@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13021
Diffstat (limited to 'src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C74
1 files changed, 50 insertions, 24 deletions
diff --git a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
index dc2f2b15e..a564c8c5c 100755
--- a/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
+++ b/src/usr/diag/prdf/common/framework/service/prdfPlatServices_common.C
@@ -710,70 +710,96 @@ int32_t getMemBufRawCardType( TargetHandle_t i_mba,
{
#define PRDF_FUNC "[PlatServices::getMemBufRawCardType] "
+ int32_t o_rc = SUCCESS;
+
o_cardType = WIRING_INVALID;
- uint8_t l_cardType = WIRING_INVALID;
- int32_t o_rc = FAIL;
do
{
- if( TYPE_MBA != getTargetType( i_mba ) )
+ if ( TYPE_MBA != getTargetType(i_mba) )
{
- PRDF_ERR( PRDF_FUNC" Invalid target 0x%08x",getHuid( i_mba ) );
+ PRDF_ERR( PRDF_FUNC"Target 0x%08x is not an MBA", getHuid(i_mba) );
+ o_rc = FAIL; break;
+ }
+
+ bool isCenDimm = false;
+ o_rc = isMembufOnDimm( i_mba, isCenDimm );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC"isMembufOnDimm() failed on MBA 0x%08x",
+ getHuid(i_mba) );
break;
}
- TargetHandleList l_dimmList = getConnected( i_mba, TYPE_DIMM );
+ if ( !isCenDimm )
+ {
+ PRDF_ERR( PRDF_FUNC"MBA 0x%08x is not on a buffered DIMM",
+ getHuid(i_mba) );
+ o_rc = FAIL; break;
+ }
- if( 0 == l_dimmList.size() )
+ TargetHandleList l_dimmList = getConnected( i_mba, TYPE_DIMM );
+ if ( 0 == l_dimmList.size() )
{
- PRDF_ERR( PRDF_FUNC " No DIMM connected with mba 0x%08x",
- getHuid( i_mba ) );
- break;
+ PRDF_ERR( PRDF_FUNC"No DIMMs connected to MBA 0x%08x",
+ getHuid(i_mba) );
+ o_rc = FAIL; break;
}
+ // All logical DIMMs connected to this MBA are on the same card as the
+ // MBA so we can use any connected DIMM to query for the raw card type.
+
errlHndl_t errl = NULL;
fapi::Target fapiDimm = getFapiTarget( l_dimmList[0] );
+ uint8_t l_cardType = WIRING_INVALID;
PRD_FAPI_TO_ERRL( errl,
fapi::platAttrSvc::fapiPlatGetSpdModspecComRefRawCard,
&fapiDimm,
l_cardType );
- if( NULL != errl )
+ if ( NULL != errl )
{
- PRDF_ERR( PRDF_FUNC" fapiPlatGetSpdModspecComRefRawCard failed for"
- "DIMM 0x%08X", getHuid( l_dimmList[0] ) );
+ PRDF_ERR( PRDF_FUNC"fapiPlatGetSpdModspecComRefRawCard() failed on"
+ "DIMM 0x%08X", getHuid(l_dimmList[0]) );
PRDF_COMMIT_ERRL( errl, ERRL_ACTION_REPORT );
- break;
+ o_rc = FAIL; break;
}
- switch( l_cardType )
+ // Centaur raw card types are only used for DRAM site locations. If an
+ // invalid wiring type is passed to the error log parser, the parser
+ // will simply print out the symbol and other data instead of
+ // translating it into a DRAM site location. Therefore, do not fail out
+ // if the raw card is currently not supported. Otherwise, there may be
+ // some downstream effects to the functional (non-parsing) code for
+ // data that is only needed for parsing.
+
+ switch ( l_cardType )
{
- case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_A :
+ case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_A:
o_cardType = CEN_TYPE_A;
break;
- case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_B :
+ case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_B:
o_cardType = CEN_TYPE_B;
break;
+ case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_C:
+ o_cardType = CEN_TYPE_C;
+ break;
+
case ENUM_ATTR_SPD_MODSPEC_COM_REF_RAW_CARD_D:
o_cardType = CEN_TYPE_D;
break;
default:
- o_cardType = WIRING_INVALID;
- break;
+ o_cardType = WIRING_INVALID; // Anything unsupported
}
- }while(0);
-
- if( WIRING_INVALID != o_cardType )
- {
- o_rc = SUCCESS;
- }
+ } while(0);
return o_rc;
+
#undef PRDF_FUNC
}
OpenPOWER on IntegriCloud