summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2018-09-18 16:42:13 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-09-26 13:03:30 -0500
commit1612a30cff6379f3323c21017b3637931b7fb912 (patch)
tree1e3c5e3ac3f6803e2e6d3fcec7d5e79010c6e451 /src/usr/diag/prdf
parent46663cd701c138b99c1d6a55ae2ba3fba0fabee7 (diff)
downloadtalos-hostboot-1612a30cff6379f3323c21017b3637931b7fb912.tar.gz
talos-hostboot-1612a30cff6379f3323c21017b3637931b7fb912.zip
PRD: Fix inputted DRAM pos for row repair
Change-Id: I54e23b3f9f9cc6bc3ed6de8577ab79467acbaa99 CQ: SW445966 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66319 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66640 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr/diag/prdf')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemRowRepair.H3
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C41
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H3
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemVcm.C3
4 files changed, 48 insertions, 2 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemRowRepair.H b/src/usr/diag/prdf/common/plat/mem/prdfMemRowRepair.H
index 0608ed7a8..a5f8f4d1f 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemRowRepair.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemRowRepair.H
@@ -125,7 +125,8 @@ uint32_t setRowRepairData( TARGETING::TargetHandle_t i_dimm,
* @param i_dimm A dimm target.
* @param i_rank Target rank.
* @param i_addr Address for the row repair.
- * @param i_dram Dram position for the row repair.
+ * @param i_dram Dram position for the row repair. NOTE: this is the dram
+ * position relative to the Centaur DQs (x8: 0-9, x4: 0-19)
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
template<TARGETING::TYPE T>
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
index 79a7c7a18..e2910cf8d 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
@@ -125,6 +125,47 @@ uint8_t MemSymbol::getDram() const
//------------------------------------------------------------------------------
+uint8_t MemSymbol::getDramRelCenDqs() const
+{
+ // This function will return the DRAM position for this symbol relative
+ // to the Centaur DQs. Mainly this is needed for the DRAM position input
+ // of Row Repair.
+
+ const uint8_t X4_ECC_SPARE = 17;
+ const uint8_t X8_ECC_SPARE = 8;
+
+ const uint8_t X4_DRAM_SPARE_LOWER = 18;
+ const uint8_t X4_DRAM_SPARE_UPPER = 19;
+ const uint8_t X8_DRAM_SPARE = 9;
+
+
+ uint8_t l_dramWidth = ( isDramWidthX4(iv_trgt) ) ? 4 : 8;
+ uint8_t l_dram = getDq() / l_dramWidth; // (x8: 0-9, x4: 0-19)
+
+ // Adjust for spares
+ if ( isDramSpared() )
+ {
+ if ( isDramWidthX4(iv_trgt) )
+ {
+ uint8_t l_bit = getDq() % DQS_PER_BYTE;
+ l_dram = ( l_bit < 4 ) ? X4_DRAM_SPARE_LOWER : X4_DRAM_SPARE_UPPER;
+ }
+ else
+ {
+ l_dram = X8_DRAM_SPARE;
+ }
+ }
+ else if ( isEccSpared() )
+ {
+ l_dram = ( isDramWidthX4(iv_trgt) ) ? X4_ECC_SPARE : X8_ECC_SPARE;
+ }
+
+ return l_dram;
+
+}
+
+//------------------------------------------------------------------------------
+
uint8_t MemSymbol::getDramPins() const
{
bool isMba = TYPE_MBA == getTargetType(iv_trgt);
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
index 9958e6761..04b2bfce0 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
@@ -128,6 +128,9 @@ class MemSymbol
/** @return The DRAM index for this symbol. */
uint8_t getDram() const;
+ /** @return The DRAM relative to the Centaur DQs */
+ uint8_t getDramRelCenDqs() const;
+
/** @return The bad pins associated with this symbol in relation to the DRAM
* (x4 mode is 4-bits, x8 mode is 8-bits). */
uint8_t getDramPins() const;
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C
index 5009b6aa6..971ea1603 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemVcm.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm.C
@@ -260,8 +260,9 @@ uint32_t VcmEvent<TYPE_MBA>::rowRepairEndRank( STEP_CODE_DATA_STRUCT & io_sc )
// If scrub gets to the end of the master rank with an MCE
// Update VPD with row repair
+ // Note: inputted DRAM position needs to be relative to the Centaur DQs
o_rc = setRowRepairData<TYPE_MBA>( l_dimm, iv_rank,
- iv_rowRepairFailAddr, iv_mark.getSymbol().getDram() );
+ iv_rowRepairFailAddr, iv_mark.getSymbol().getDramRelCenDqs() );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "setRowRepairData(0x%08x, 0x%02x) "
OpenPOWER on IntegriCloud