From 93a05fa7d48c6a76e521b00f438082e1d9f6bab8 Mon Sep 17 00:00:00 2001 From: Caleb Palmer Date: Mon, 7 May 2018 09:14:16 -0500 Subject: PRD: Update getDimmDqAttr for Centaur Change-Id: Ibdb47fa9528e4c4c562e1f70f242b8c4b84c5160 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58415 Tested-by: Jenkins Server Reviewed-by: Benjamin J. Weisenbeck Reviewed-by: Brian J. Stegmiller Reviewed-by: Matt Derksen Reviewed-by: Zane C. Shelley Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58722 Tested-by: Jenkins OP Build CI Tested-by: FSP CI Jenkins Tested-by: Jenkins OP HW --- .../diag/prdf/common/plat/mem/prdfMemCaptureData.C | 14 +++++++++- .../prdf/common/plat/prdfPlatServices_common.C | 30 +++++++++++++++++++--- .../prdf/common/plat/prdfPlatServices_common.H | 1 + 3 files changed, 41 insertions(+), 4 deletions(-) (limited to 'src/usr') diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C index 1d347514f..835309b6a 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C @@ -103,7 +103,19 @@ void addExtMemMruData( const MemoryMru & i_memMru, errlHndl_t io_errl ) "single DIMM." ); break; } - getDimmDqAttr( trgt, extMemMru.dqMapping ); + if ( TYPE_MCA == getTargetType(trgt) ) + { + getDimmDqAttr( trgt, extMemMru.dqMapping ); + } + else if ( TYPE_MBA == getTargetType(trgt) ) + { + getDimmDqAttr(partList[0], extMemMru.dqMapping); + } + else + { + PRDF_ERR( PRDF_FUNC "Invalid target type." ); + PRDF_ASSERT(false); + } } } diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C index e4df155cc..97ffc839f 100644 --- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C +++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.C @@ -634,10 +634,11 @@ int32_t getDimmSpareConfig( TargetHandle_t i_mba, CenRank i_rank, */ //------------------------------------------------------------------------------ -void getDimmDqAttr( TargetHandle_t i_target, - uint8_t (&o_dqMapPtr)[DQS_PER_DIMM] ) +template<> +void getDimmDqAttr( TargetHandle_t i_target, + uint8_t (&o_dqMapPtr)[DQS_PER_DIMM] ) { - #define PRDF_FUNC "[PlatServices::getDimmDqAttr] " + #define PRDF_FUNC "[PlatServices::getDimmDqAttr] " PRDF_ASSERT( TYPE_MCA == getTargetType(i_target) ); @@ -657,6 +658,29 @@ void getDimmDqAttr( TargetHandle_t i_target, #undef PRDF_FUNC } // end function getDimmDqAttr +template<> +void getDimmDqAttr( TargetHandle_t i_target, + uint8_t (&o_dqMapPtr)[DQS_PER_DIMM] ) +{ + #define PRDF_FUNC "[PlatServices::getDimmDqAttr] " + + PRDF_ASSERT( TYPE_DIMM == getTargetType(i_target) ); + + const uint8_t DIMM_BAD_DQ_SIZE_BYTES = 80; + + uint8_t tmpData[DIMM_BAD_DQ_SIZE_BYTES]; + + if ( !i_target->tryGetAttr(tmpData) ) + { + PRDF_ERR( PRDF_FUNC "Failed to get ATTR_CEN_DQ_TO_DIMM_CONN_DQ" ); + PRDF_ASSERT( false ); + } + + memcpy( &o_dqMapPtr[0], &tmpData[0], DQS_PER_DIMM ); + + #undef PRDF_FUNC +} // end function getDimmDqAttr + //------------------------------------------------------------------------------ /* TODO RTC 169956 diff --git a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H index a71f44061..790fb3fb6 100755 --- a/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H +++ b/src/usr/diag/prdf/common/plat/prdfPlatServices_common.H @@ -327,6 +327,7 @@ int32_t getMemBufRawCardType( TARGETING::TargetHandle_t i_mbaTarget, * @param io_dqMapPtr Pointer to area to receive DIMM DQ map (80 bytes) * @return Non-Null if error log occurs */ +template void getDimmDqAttr( TARGETING::TargetHandle_t i_target, uint8_t (&io_dqMapPtr)[DQS_PER_DIMM] ); -- cgit v1.2.1