summaryrefslogtreecommitdiffstats
path: root/src/usr/diag
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2018-06-12 16:17:27 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-06-14 13:40:12 -0400
commit36b343d78a73b9d923329c41a8863ebe4f285b7e (patch)
tree9e9e6f57fe1370521f076930af63b89debb1924f /src/usr/diag
parent25da6f2681793a9972c2c55db499d66fd7f42da3 (diff)
downloadtalos-hostboot-36b343d78a73b9d923329c41a8863ebe4f285b7e.tar.gz
talos-hostboot-36b343d78a73b9d923329c41a8863ebe4f285b7e.zip
PRD: use correct symbol when writing MBA markstore
Change-Id: I94db83c4ff438a02df04d8c8e7f17cd491c6c720 CQ: SW433063 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60437 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Diffstat (limited to 'src/usr/diag')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemMark.C4
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemMark.H17
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C14
-rwxr-xr-xsrc/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H3
4 files changed, 25 insertions, 13 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.C b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.C
index 567c01c33..0e99d8a49 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.C
@@ -131,7 +131,7 @@ uint32_t writeChipMark<TYPE_MCA>( ExtensibleChip * i_chip,
SCAN_COMM_REGISTER_CLASS * hwms = i_chip->getRegister( msName );
// HWMSx[0:7] set this to the Galois field.
- hwms->SetBitFieldJustified( 0, 8, i_mark.getChipGalois() );
+ hwms->SetBitFieldJustified( 0, 8, i_mark.getDramGalois() );
// HWMSx[8] confirmed with the hardware team that this will not trigger
// another MPE attention and that they want this set to 1.
@@ -518,7 +518,7 @@ uint32_t writeChipMark<TYPE_MBA>( ExtensibleChip * i_chip,
uint8_t l_sm = l_symMark.isValid() ? l_symMark.getSymbol().getSymbol()
: MSS_INVALID_SYMBOL;
- uint8_t l_cm = i_mark.isValid() ? i_mark.getSymbol().getSymbol()
+ uint8_t l_cm = i_mark.isValid() ? i_mark.getSymbol().getDramSymbol()
: MSS_INVALID_SYMBOL;
errlHndl_t l_errl = nullptr;
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
index d0f8c57ef..2cd28b8dd 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemMark.H
@@ -63,48 +63,43 @@ class MemMark
*/
MemMark( TARGETING::TargetHandle_t i_trgt, const MemRank & i_rank,
uint8_t i_galois ) :
- iv_galois( i_galois ),
iv_symbol( MemSymbol::fromGalois(i_trgt, i_rank, i_galois) )
{}
/**
- * @brief Cosntructor from components.
+ * @brief Constructor from components.
* @param i_trgt MBA or MCA target.
* @param i_rank The rank this mark is on.
* @param i_symbol The symbol representing this mark.
*/
MemMark( TARGETING::TargetHandle_t i_trgt, const MemRank & i_rank,
const MemSymbol & i_symbol ) :
- iv_galois( i_symbol.getGalois() ),
iv_symbol( i_symbol )
{}
public: // functions
/** @return The Galois field representing this mark. */
- uint8_t getGalois() const { return iv_galois; }
+ uint8_t getGalois() const { return iv_symbol.getGalois(); }
/** @return The Galois field associated with the chip this mark is in.
* Will correspond to the rightmost/least index symbol in the chip. You
* must check for a valid symbol before calling this function. */
- uint8_t getChipGalois() const
+ uint8_t getDramGalois() const
{
PRDF_ASSERT( iv_symbol.isValid() );
- return symbol2Galois[(iv_symbol.getSymbol()/4)*4];
+ return symbol2Galois[iv_symbol.getDramSymbol()];
}
/** @return The symbol representing this mark. */
MemSymbol getSymbol() const { return iv_symbol; }
- /** @return The symbol representing this mark. */
+ /** @return True if the symbol representing this mark is valid. */
bool isValid() const { return iv_symbol.isValid(); }
private: // instance variables
- /** Galois field representing any symbol on this mark. */
- uint8_t iv_galois = 0;
-
- /** Any symbol on this mark (must match iv_galois). */
+ /** Any symbol on this mark. */
MemSymbol iv_symbol = MemSymbol();
};
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
index 51d81d780..79a7c7a18 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.C
@@ -139,6 +139,20 @@ uint8_t MemSymbol::getDramPins() const
//------------------------------------------------------------------------------
+uint8_t MemSymbol::getDramSymbol() const
+{
+ bool isMba = TYPE_MBA == getTargetType(iv_trgt);
+ bool isX4 = isDramWidthX4( iv_trgt );
+ uint8_t dram = getDram();
+
+ return isMba ? isX4 ? nibble2Symbol<TYPE_MBA>( dram )
+ : byte2Symbol <TYPE_MBA>( dram )
+ : isX4 ? nibble2Symbol<TYPE_MCA>( dram )
+ : byte2Symbol <TYPE_MCA>( dram );
+}
+
+//------------------------------------------------------------------------------
+
uint8_t MemSymbol::getGalois() const
{
return symbol2Galois[iv_symbol];
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
index d52bf7c8c..9958e6761 100755
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemSymbol.H
@@ -132,6 +132,9 @@ class MemSymbol
* (x4 mode is 4-bits, x8 mode is 8-bits). */
uint8_t getDramPins() const;
+ /** @return The first symbol (smallest index) on the associated DRAM. */
+ uint8_t getDramSymbol() const;
+
/** @return The Galois field associated with this symbol. */
uint8_t getGalois() const;
OpenPOWER on IntegriCloud