summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf
diff options
context:
space:
mode:
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