summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf
diff options
context:
space:
mode:
authorsachin gupta <sgupta2m@in.ibm.com>2013-07-01 01:56:05 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-07-30 16:45:00 -0500
commit768a1f22e837574642ee10c75b6bafd5171ac8f9 (patch)
treee590ebfa919325e3747eda1dd648af65265bbadc /src/usr/diag/prdf
parent98fed744f18e2dad22ca9b5e8578c027d8bdf1d0 (diff)
downloadtalos-hostboot-768a1f22e837574642ee10c75b6bafd5171ac8f9.tar.gz
talos-hostboot-768a1f22e837574642ee10c75b6bafd5171ac8f9.zip
PRD: Identify unverified CM during TD controller initialize
Change-Id: Id877bf0f68cca7a09913ffd1ccd5e38aa0d21128 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5258 Tested-by: Jenkins Server Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/5592 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf')
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C41
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H8
2 files changed, 49 insertions, 0 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C
index 48ea97c00..a8a317f80 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.C
@@ -174,6 +174,47 @@ int32_t CenDqBitmap::setDram( uint8_t i_symbol, uint8_t i_pins )
//------------------------------------------------------------------------------
+int32_t CenDqBitmap::isChipMark( uint8_t i_symbol, bool & o_cm )
+{
+ #define PRDF_FUNC "[CenDqBitmap::isChipMark] "
+
+ int32_t o_rc = SUCCESS;
+ o_cm = false;
+
+ do
+ {
+ uint8_t evenDq = CenSymbol::symbol2CenDq( i_symbol );
+ uint8_t portSlct = CenSymbol::symbol2PortSlct( i_symbol );
+ if ( DQS_PER_DIMM <= evenDq || PORT_SLCT_PER_MBA <= portSlct )
+ {
+ PRDF_ERR( PRDF_FUNC"Invalid parameter: i_symbol=%d", i_symbol );
+ o_rc = FAIL; break;
+ }
+
+ uint8_t byteIdx = evenDq / DQS_PER_BYTE;
+ uint8_t bitIdx = evenDq % DQS_PER_BYTE;
+
+ uint8_t pins = 0xff;
+ uint8_t cmData = iv_data[portSlct][byteIdx];
+
+ if ( isDramWidthX4(iv_mba) )
+ {
+ pins = 0xf; // limit to 4 bits
+ uint8_t shift = (((DQS_PER_BYTE-1) - bitIdx) % 4) * 4; // 0,4
+ cmData = (cmData >> shift) & 0xf;
+ }
+
+ o_cm = ( cmData == pins );
+
+ } while (0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
int32_t CenDqBitmap::setDramSpare( uint8_t i_portSlct, uint8_t i_pins )
{
#define PRDF_FUNC "[CenDqBitmap::setDramSpare] "
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H
index 4762caecd..225ac1a35 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenDqBitmap.H
@@ -96,6 +96,14 @@ class CenDqBitmap
int32_t setDram( uint8_t i_symbol, uint8_t i_pins = 0xff );
/**
+ * @brief Checks if chip mark is present on specified DRAM.
+ * @param i_symbol A symbol on the target DRAM.
+ * @param o_cm True if chip mark is present false otherwise.
+ * @return Non-SUCCESS if an internal function failed, SUCCESS otherwise.
+ */
+ int32_t isChipMark( uint8_t i_symbol, bool & o_cm );
+
+ /**
* @brief Sets the DRAM spare on the specified port.
* @param i_portSlct The target port.
* @param i_pins Optional 8-bit (x8 mode) or 4-bit (x4 mode) value of
OpenPOWER on IntegriCloud