summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2017-01-10 09:31:36 -0600
committerZane C. Shelley <zshelle@us.ibm.com>2017-01-25 17:33:28 -0500
commit049679c48e1fce3c18f7ca9547ec6b7ac565b879 (patch)
treeb554f497e5c8c3ae1237ea8621ef312faa0d2c29 /src/usr
parentbf0eecf3d45af318152bb791d1a333c703233098 (diff)
downloadtalos-hostboot-049679c48e1fce3c18f7ca9547ec6b7ac565b879.tar.gz
talos-hostboot-049679c48e1fce3c18f7ca9547ec6b7ac565b879.zip
PRD: Ported CE table from P8 to P9
Change-Id: Ib3992610867f8f2ec72992f6c2936d7a4881a3fd RTC: 165381 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34742 Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com> Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35414
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C)97
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H)77
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk3
3 files changed, 73 insertions, 104 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
index 8430d58df..639ed139d 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.C $ */
+/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2015 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -23,18 +23,14 @@
/* */
/* IBM_PROLOG_END_TAG */
-#include <prdfCenMbaCeTable.H>
+#include <prdfMemCeTable.H>
#include <algorithm>
// Framwork includes
#include <iipServiceDataCollector.h>
-#include <prdfPlatServices.H>
#include <UtilHash.H>
-// Pegasus includes
-#include <prdfCenMarkstore.H>
-
using namespace TARGETING;
namespace PRDF
@@ -45,14 +41,13 @@ using namespace CE_TABLE;
//------------------------------------------------------------------------------
-uint32_t CenMbaCeTable::addEntry( const CenAddr & i_addr,
- const CenSymbol & i_symbol, bool i_isHard )
+uint32_t MemCeTable::addEntry( const MemAddr & i_addr,
+ const MemSymbol & i_symbol, bool i_isHard )
{
uint32_t o_rc = NO_TH_REACHED;
TableData data ( i_addr, i_symbol.getDram(), i_symbol.getDramPins(),
- i_symbol.getPortSlct(), i_symbol.getWiringType(),
- i_isHard, i_symbol.isDramSpared(),
+ i_symbol.getPortSlct(), i_isHard, i_symbol.isDramSpared(),
i_symbol.isEccSpared() );
// First, check if the entry already exists. If so, increment its count and
@@ -86,7 +81,7 @@ uint32_t CenMbaCeTable::addEntry( const CenAddr & i_addr,
// Get number of entries in this table on the same rank as the new entry and
// threshold if needed.
- CenRank thisRank = data.addr.getRank();
+ MemRank thisRank = data.addr.getRank();
uint32_t rankCount = 0;
for ( CeTable::iterator it = iv_table.begin(); it != iv_table.end(); it++ )
{
@@ -130,18 +125,7 @@ uint32_t CenMbaCeTable::addEntry( const CenAddr & i_addr,
//------------------------------------------------------------------------------
-void CenMbaCeTable::deactivateAll()
-{
- // NOTE: We don't want to reset the count here because it will be used for
- // FFDC. Instead the count will be reset in addEntry() if the entry is
- // not active.
- for ( CeTable::iterator it = iv_table.begin(); it != iv_table.end(); it++ )
- it->active = false;
-}
-
-//------------------------------------------------------------------------------
-
-void CenMbaCeTable::deactivateRank( const CenRank & i_rank )
+void MemCeTable::deactivateRank( const MemRank & i_rank )
{
// NOTE: We don't want to reset the count here because it will be used for
// FFDC. Instead the count will be reset in addEntry() if the entry is
@@ -155,13 +139,13 @@ void CenMbaCeTable::deactivateRank( const CenRank & i_rank )
//------------------------------------------------------------------------------
-void CenMbaCeTable::getMnfgCounts( const CenRank & i_rank,
- const CenSymbol & i_symbol,
- uint32_t & o_dramCount,
- uint32_t & o_hrCount,
- uint32_t & o_dimmCount )
+void MemCeTable::getMnfgCounts( const MemRank & i_rank,
+ const MemSymbol & i_symbol,
+ uint32_t & o_dramCount,
+ uint32_t & o_rankCount,
+ uint32_t & o_dimmCount )
{
- o_dramCount = 0; o_hrCount = 0; o_dimmCount = 0;
+ o_dramCount = 0; o_rankCount = 0; o_dimmCount = 0;
const uint32_t dram = i_symbol.getDram();
const uint32_t ps = i_symbol.getPortSlct();
@@ -171,7 +155,7 @@ void CenMbaCeTable::getMnfgCounts( const CenRank & i_rank,
{
if ( ps != it->portSlct ) continue;
- CenRank itRank = it->addr.getRank();
+ MemRank itRank = it->addr.getRank();
if ( ds == itRank.getDimmSlct() )
{
@@ -179,7 +163,7 @@ void CenMbaCeTable::getMnfgCounts( const CenRank & i_rank,
if ( i_rank == itRank )
{
- o_hrCount++;
+ o_rankCount++;
if ( dram == it->dram )
o_dramCount++;
@@ -190,7 +174,7 @@ void CenMbaCeTable::getMnfgCounts( const CenRank & i_rank,
//------------------------------------------------------------------------------
-void CenMbaCeTable::addCapData( CaptureData & io_cd )
+void MemCeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd )
{
static const size_t sz_word = sizeof(CPU_WORD);
@@ -203,23 +187,29 @@ void CenMbaCeTable::addCapData( CaptureData & io_cd )
size_t sz_actData = 0;
- uint32_t mbaPos = getTargetPosition( iv_mbaTrgt );
+ // Centaur specific info.
+ uint8_t isMba = 0;
+ uint8_t mbaPos = 0;
+ if ( TYPE_MBA == i_chip->getType() )
+ {
+ isMba = 1;
+ mbaPos = getTargetPosition( i_chip->getTrgt() );
+ }
for ( CeTable::iterator it = iv_table.begin(); it != iv_table.end(); it++ )
{
- uint32_t mrnk = it->addr.getRank().getMaster(); // 3-bit
- uint32_t srnk = it->addr.getRank().getSlave(); // 3-bit
- uint32_t svld = it->addr.getRank().isSlaveValid() ? 1 : 0; // 1-bit
- uint32_t bnk = it->addr.getBank(); // 4-bit
- uint32_t row = it->addr.getRow(); // 17-bit
- uint32_t col = it->addr.getCol(); // 12-bit
+ uint32_t mrnk = it->addr.getRank().getMaster(); // 3-bit
+ uint32_t srnk = it->addr.getRank().getSlave(); // 3-bit
+ uint32_t bnk = it->addr.getBank(); // 5-bit (MCA)
+ uint32_t row = it->addr.getRow(); // 18-bit
+ uint32_t col = it->addr.getCol(); // 9-bit (MBA)
- uint8_t row0 = (row & 0x10000) >> 16;
- uint8_t row1_8 = (row & 0x0ff00) >> 8;
- uint8_t row9_16 = row & 0x000ff;
+ uint8_t row0_1 = (row & 0x30000) >> 16;
+ uint8_t row2_9 = (row & 0x0ff00) >> 8;
+ uint8_t row10_17 = row & 0x000ff;
- uint8_t col0_3 = (col & 0xf00) >> 8;
- uint8_t col4_11 = col & 0x0ff;
+ uint8_t col0 = (col & 0x100) >> 8;
+ uint8_t col1_8 = col & 0x0ff;
uint8_t active = it->active ? 1 : 0;
uint8_t isHard = it->isHard ? 1 : 0;
@@ -227,17 +217,16 @@ void CenMbaCeTable::addCapData( CaptureData & io_cd )
uint8_t isEcc = it->isEccSpared ? 1 : 0;
data[sz_actData ] = it->count;
- data[sz_actData+1] = ((it->type & 0x7) << 5) |
+ data[sz_actData+1] = // 3 bits spare here.
(mbaPos << 4) | (it->portSlct << 3) |
- (isSp << 2) | (isEcc << 1) |
- ((it->type & 0x8) >> 3);
+ (isSp << 2) | (isEcc << 1) | isMba;
data[sz_actData+2] = (isHard << 7) | (active << 6) | (it->dram & 0x3f);
data[sz_actData+3] = it->dramPins;
- data[sz_actData+4] = (mrnk << 5) | (srnk << 2) | (svld << 1) | row0;
- data[sz_actData+5] = row1_8;
- data[sz_actData+6] = row9_16;
- data[sz_actData+7] = (bnk << 4) | col0_3;
- data[sz_actData+8] = col4_11;
+ data[sz_actData+4] = (mrnk << 5) | (srnk << 2) | row0_1;
+ data[sz_actData+5] = row2_9;
+ data[sz_actData+6] = row10_17;
+ data[sz_actData+7] = (bnk << 3) | col0; // 2 bits to spare in between.
+ data[sz_actData+8] = col1_8;
sz_actData += ENTRY_SIZE;
}
@@ -251,7 +240,7 @@ void CenMbaCeTable::addCapData( CaptureData & io_cd )
// Add data to capture data.
BIT_STRING_ADDRESS_CLASS bs ( 0, sz_actData*8, (CPU_WORD *) &data );
- io_cd.Add( iv_mbaTrgt, Util::hashString("MEM_CE_TABLE"), bs );
+ io_cd.Add( i_chip->getTrgt(), Util::hashString("MEM_CE_TABLE"), bs );
}
}
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
index 3842819ba..00b38d691 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
@@ -1,11 +1,11 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaCeTable.H $ */
+/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2014 */
+/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -23,19 +23,19 @@
/* */
/* IBM_PROLOG_END_TAG */
-#ifndef __prdfCenMbaCeTable_H
-#define __prdfCenMbaCeTable_H
+#ifndef __prdfMemCeTable_H
+#define __prdfMemCeTable_H
-/** @file prdfCenMbaCeTable.H */
+/** @file prdfMemCeTable.H */
// Framwork includes
#include <iipCaptureData.h>
-#include <prdfParserEnums.H>
-#include <prdfPlatServices.H>
+#include <prdfExtensibleChip.H>
// Pegasus includes
-#include <prdfCenAddress.H>
-#include <prdfCenSymbol.H>
+#include <prdfMemAddress.H>
+#include <prdfMemSymbol.H>
+#include <prdfParserEnums.H>
// Other includes
#include <list>
@@ -43,15 +43,13 @@
namespace PRDF
{
-class CenMark;
-
/**
* @brief A table of memory CEs.
- * @note Only one of these tables will exist per MBA.
+ * @note Only one of these tables will exist per MBA/MCA.
* @note Will be used to determine when to do a TPS procedure for Targeted
* Diagnostics at runtime. Will be used for FFDC only during Hostboot.
*/
-class CenMbaCeTable
+class MemCeTable
{
public: // constants, enums
@@ -79,14 +77,6 @@ class CenMbaCeTable
public: // functions
/**
- * @brief Constructor
- * @param i_mbaTrgt An MBA target.
- */
- explicit CenMbaCeTable( TARGETING::TargetHandle_t i_mbaTrgt ) :
- iv_mbaTrgt( i_mbaTrgt )
- {}
-
- /**
* @brief Will attempt to add a new entry to the table.
*
* If an entry already exists, the entry's count is incremented. Otherwise,
@@ -101,19 +91,14 @@ class CenMbaCeTable
* @param i_isHard TRUE if a hard CE was detected on this address/symbol.
* @return Mask of possible return codes (see enum AddEntryRc).
*/
- uint32_t addEntry( const CenAddr & i_addr, const CenSymbol & i_symbol,
+ uint32_t addEntry( const MemAddr & i_addr, const MemSymbol & i_symbol,
bool i_isHard = false );
/**
- * @brief Deactivates all entries in the table.
- */
- void deactivateAll();
-
- /**
* @brief Deactivates all entries covered by a rank.
* @param i_rank The target rank.
*/
- void deactivateRank( const CenRank & i_rank );
+ void deactivateRank( const MemRank & i_rank );
/**
* @brief Iterates the entire table and returns the number of unique entries
@@ -121,19 +106,19 @@ class CenMbaCeTable
* @param i_rank The failing rank.
* @param i_symbol The failing symbol.
* @param o_dramCount The entry count for the target dram.
- * @param o_hrCount The entry count for the target half-rank (per rank
- * per port select).
+ * @param o_rankCount The entry count for the target rank per logical DIMM.
* @param o_dimmCount The entry count for the target logical DIMM.
*/
- void getMnfgCounts( const CenRank & i_rank, const CenSymbol & i_symbol,
- uint32_t & o_dramCount, uint32_t & o_hrCount,
+ void getMnfgCounts( const MemRank & i_rank, const MemSymbol & i_symbol,
+ uint32_t & o_dramCount, uint32_t & o_rankCount,
uint32_t & o_dimmCount );
/**
* @brief Gathers all table data to be stored in capture data.
- * @param io_cd Capture data struct.
+ * @param i_chip An MCA or MBA chip.
+ * @param io_cd Capture data struct.
*/
- void addCapData( CaptureData & io_cd );
+ void addCapData( ExtensibleChip * i_chip, CaptureData & io_cd );
private: // structs, typedefs
@@ -142,11 +127,10 @@ class CenMbaCeTable
{
bool active; ///< TRUE if this entry is active
uint8_t count; ///< Number of times this entry is detected
- CenAddr addr; ///< Physical address of this entry
+ MemAddr addr; ///< Physical address of this entry
uint8_t dram; ///< The DRAM in which the CE was detected
uint8_t dramPins; ///< The failing pins of the DRAM
- uint8_t portSlct; ///< The port select of the DRAM
- CEN_SYMBOL::WiringType type; ///< The wiring type
+ uint8_t portSlct; ///< The port select of the DRAM (MBA only)
bool isHard; ///< TRUE if a hard CE was detected
bool isDramSpared; ///< TRUE if on spare DRAM
bool isEccSpared; ///< TRUE if on ECC spare
@@ -154,8 +138,7 @@ class CenMbaCeTable
/** @brief Default constructor. */
TableData() :
active(false), count(0), addr(), dram(0), dramPins(0), portSlct(0),
- type(CEN_SYMBOL::WIRING_INVALID), isHard(false),
- isDramSpared(false), isEccSpared(false)
+ isHard(false), isDramSpared(false), isEccSpared(false)
{}
/**
@@ -165,13 +148,12 @@ class CenMbaCeTable
* @param i_dramPins The failing pins of the DRAM
* @param i_type The wiring type (for DRAM site locations).
*/
- TableData( const CenAddr & i_addr, uint8_t i_dram, uint8_t i_dramPins,
- uint8_t i_portSlct, CEN_SYMBOL::WiringType i_type,
- bool i_isHard, bool i_isDramSpared, bool i_isEccSpared ) :
+ TableData( const MemAddr & i_addr, uint8_t i_dram, uint8_t i_dramPins,
+ uint8_t i_portSlct, bool i_isHard, bool i_isDramSpared,
+ bool i_isEccSpared ) :
active(true), count(1), addr(i_addr), dram(i_dram),
- dramPins(i_dramPins), portSlct(i_portSlct), type(i_type),
- isHard(i_isHard), isDramSpared(i_isDramSpared),
- isEccSpared(i_isEccSpared)
+ dramPins(i_dramPins), portSlct(i_portSlct), isHard(i_isHard),
+ isDramSpared(i_isDramSpared), isEccSpared(i_isEccSpared)
{}
/** An entry is equivalent if the address and DRAM match. */
@@ -185,9 +167,6 @@ class CenMbaCeTable
private: // instance variables
- /** MBA associated with this table. */
- TARGETING::TargetHandle_t iv_mbaTrgt;
-
/** A storage container for memory fetch CE errors. */
CeTable iv_table;
@@ -195,5 +174,5 @@ class CenMbaCeTable
} // end namespace PRDF
-#endif // __prdfCenMbaCeTable_H
+#endif // __prdfMemCeTable_H
diff --git a/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk b/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
index 3185be6c0..a8476a61e 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
+++ b/src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2016
+# Contributors Listed Below - COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
@@ -40,6 +40,7 @@ prd_incpath += ${PRD_SRC_PATH}/common/plat/mem
# non-rule plugin related
prd_obj += prdfMemAddress.o
prd_obj += prdfMemCaptureData.o
+prd_obj += prdfMemCeTable.o
prd_obj += prdfMemEccAnalysis.o
prd_obj += prdfMemMark.o
prd_obj += prdfMemSymbol.o
OpenPOWER on IntegriCloud