summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-02-22 16:27:18 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2017-02-27 10:41:34 -0500
commit7989df3da7bb36bc8c8f0fed5e59125788e79c6d (patch)
tree48ffb30863d28abf537958287528a41b0d5fb192 /src/usr
parent245717655c4f0c078f150b64cdb8480ad2bcc39a (diff)
downloadtalos-hostboot-7989df3da7bb36bc8c8f0fed5e59125788e79c6d.tar.gz
talos-hostboot-7989df3da7bb36bc8c8f0fed5e59125788e79c6d.zip
PRD: Clear symbol marks when chip mark placed on same DRAM
Change-Id: I8afeb1c0794d513780caa293b8af58669fa2afd1 RTC: 164705 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36887 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/37050 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemMark.H42
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C7
2 files changed, 47 insertions, 2 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
index b7dd461ab..ccd41359e 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016 */
+/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -147,6 +147,46 @@ uint32_t writeSymbolMark( ExtensibleChip * i_chip, const MemRank & i_rank,
template<TARGETING::TYPE T>
uint32_t clearSymbolMark( ExtensibleChip * i_chip, const MemRank & i_rank );
+/**
+ * @brief If a rank contains a symbol mark that is on the same DRAM as the chip
+ * mark, the symbol mark is removed. This is done to free up available
+ * repairs.
+ * @param i_chip MBA or MCA chip.
+ * @param i_rank Target rank.
+ * @return Non-SUCCESS if an internal function fails. SUCCESS otherwise.
+ */
+template<TARGETING::TYPE T>
+uint32_t balance( ExtensibleChip * i_chip, const MemRank & i_rank )
+{
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ // Get the chip mark.
+ MemMark chipMark;
+ o_rc = readChipMark<T>( i_chip, i_rank, chipMark );
+ if ( SUCCESS != o_rc ) break;
+ if ( !chipMark.isValid() ) break; // nothing to do.
+
+ // Get the symbol mark.
+ MemMark symMark;
+ o_rc = readSymbolMark<T>( i_chip, i_rank, symMark );
+ if ( SUCCESS != o_rc ) break;
+ if ( !symMark.isValid() ) break; // nothing to do.
+
+ // If both the chip and symbol mark are on the same DRAM, clear the
+ // symbol mark.
+ if ( chipMark.getSymbol().getDram() == symMark.getSymbol().getDram() )
+ {
+ o_rc = clearSymbolMark<T>( i_chip, i_rank );
+ if ( SUCCESS != o_rc ) break;
+ }
+
+ } while (0);
+
+ return o_rc;
+}
+
} // end namespace MarkStore
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
index 50d47aae5..389adff8b 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
@@ -174,7 +174,12 @@ uint32_t VcmEvent<TYPE_MCA>::nextStep( STEP_CODE_DATA_STRUCT & io_sc,
// If there is a symbol mark on the same DRAM as the newly
// verified chip mark, remove the symbol mark.
- // TODO: RTC 164705
+ o_rc = MarkStore::balance<TYPE_MCA>( iv_chip, iv_rank );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "MarkStore::balance(0x%08x, %d) failed",
+ iv_chip->getHuid(), iv_rank.getMaster() );
+ }
// Set entire chip in DRAM Repairs VPD.
// TODO: RTC 169939
OpenPOWER on IntegriCloud