summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
diff options
context:
space:
mode:
authorBilicon Patil <bilpatil@in.ibm.com>2014-03-28 11:01:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-08 14:38:54 -0500
commit34e3f40d66d04197875ca282e216f248cd607be7 (patch)
tree55798dfe57cc6a74c35c970daab809ef571eab70 /src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
parent5257e66e8bba33b3f408d922606ef6bd78e6dd6e (diff)
downloadtalos-hostboot-34e3f40d66d04197875ca282e216f248cd607be7.tar.gz
talos-hostboot-34e3f40d66d04197875ca282e216f248cd607be7.zip
PRD: Common util file for plugin and functional code
Change-Id: I00d7d886250544c2bd63eae0f9dbe14b5810a5fc RTC: 99972 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9990 Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Tested-by: Jenkins Server Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/10968 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf/common/plugins/prdfCenLogParse.C')
-rw-r--r--src/usr/diag/prdf/common/plugins/prdfCenLogParse.C53
1 files changed, 2 insertions, 51 deletions
diff --git a/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
index e6c7c220d..1413b1ef8 100644
--- a/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
+++ b/src/usr/diag/prdf/common/plugins/prdfCenLogParse.C
@@ -34,6 +34,7 @@
#include <prdfDramRepairUsrData.H>
#include <prdfMemoryMruData.H>
#include <prdfParserEnums.H>
+#include <prdfParserUtils.H>
namespace PRDF
{
@@ -46,6 +47,7 @@ namespace FSP
{
using namespace PARSER;
+using namespace PARSERUTILS;
using namespace MemoryMruData;
using namespace CEN_SYMBOL;
@@ -1325,57 +1327,6 @@ int32_t getDramSiteInfo( uint8_t i_cardType, uint8_t i_mbaPos,
return o_rc;
}
-//##############################################################################
-// Support functions for translating between symbol, DQ, and DRAM index.
-// TODO: RTC 99972 - These functions are copies of functions in the CenSymbol
-// class. Need to create common util functions that are available for both
-// the functional code and the error log plugin code.
-//##############################################################################
-
-uint8_t symbol2CenDq( uint8_t i_symbol )
-{
- uint8_t cenDq = DQS_PER_DIMM;
-
- if ( SYMBOLS_PER_RANK > i_symbol )
- {
- if ( 8 > i_symbol )
- cenDq = ( ((3 - (i_symbol % 4)) * 2) + 64 );
- else
- cenDq = ( (31 - (((i_symbol - 8) % 32))) * 2 );
- }
-
- return cenDq;
-}
-
-//------------------------------------------------------------------------------
-
-uint8_t symbol2PortSlct( uint8_t i_symbol )
-{
- uint8_t portSlct = PORT_SLCT_PER_MBA;
-
- if ( SYMBOLS_PER_RANK > i_symbol )
- {
- portSlct = ( ((i_symbol <= 3) || ((8 <= i_symbol) && (i_symbol <= 39)))
- ? 1 : 0 );
- }
-
- return portSlct;
-}
-
-//------------------------------------------------------------------------------
-
-uint8_t dram2Symbol( uint8_t i_dram, bool i_isX4Dram )
-{
- const uint8_t dramsPerRank = i_isX4Dram ? X4DRAMS_PER_RANK
- : X8DRAMS_PER_RANK;
-
- const uint8_t symbolsPerDram = i_isX4Dram ? SYMBOLS_PER_X4DRAM
- : SYMBOLS_PER_X8DRAM;
-
- return (dramsPerRank > i_dram) ? (i_dram * symbolsPerDram)
- : SYMBOLS_PER_RANK;
-}
-
//------------------------------------------------------------------------------
// Returns the symbol 0-71, or 0-1 if ECC spared.
OpenPOWER on IntegriCloud