diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2016-12-02 14:33:38 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2016-12-09 18:17:29 -0500 |
commit | 8e96aab2791946f0b2327c6adec1b9f527f3ec93 (patch) | |
tree | 0dce02675fd7dc3609a43b2e112d589a4959de30 /src | |
parent | e5994062ac579d93a53ed3a9089e221cd3438826 (diff) | |
download | talos-hostboot-8e96aab2791946f0b2327c6adec1b9f527f3ec93.tar.gz talos-hostboot-8e96aab2791946f0b2327c6adec1b9f527f3ec93.zip |
PRD: ported UE table to P9
Change-Id: I42061daef78f1369ea9739ffa6478ef52f8acc79
RTC: 165374
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33205
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/33652
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/usr/diag/prdf/common/plat/mem/prdfMemAddress.H | 6 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.C) | 45 | ||||
-rwxr-xr-x | src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.H) | 48 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk | 1 |
4 files changed, 45 insertions, 55 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemAddress.H b/src/usr/diag/prdf/common/plat/mem/prdfMemAddress.H index 868167820..70725a20a 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemAddress.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemAddress.H @@ -115,10 +115,10 @@ class MemAddr * @param i_bnk Bank MBA (DDR4): bg1-bg0,b1-b0 (4-bit) * MBA (DDR3): b2-b0 (3-bit) * MCBIST: bg0-bg1,b0-b2 (5-bit) - * @param i_row Row MBA: c13,c11,c9-c3 (9-bit) - * MCBIST: c3-c9 (7-bit) - * @param i_col Column MBA: r17-r0 (18-bit) + * @param i_row Row MBA: r17-r0 (18-bit) * MCBIST: r0-r17 (18-bit) + * @param i_col Column MBA: c13,c11,c9-c3 (9-bit) + * MCBIST: c3-c9 (7-bit) */ MemAddr( MemRank i_rnk, uint8_t i_bnk, uint32_t i_row, uint16_t i_col ) : iv_rnk(i_rnk), iv_bnk(i_bnk), iv_row(i_row), iv_col(i_col) diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C index 58c6689d0..fc9e10c7e 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.C $ */ +/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* Contributors Listed Below - COPYRIGHT 2013,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,11 +23,11 @@ /* */ /* IBM_PROLOG_END_TAG */ -#include <prdfCenMbaUeTable.H> +#include <prdfMemUeTable.H> #include <algorithm> -// Framwork includes +// Framework includes #include <iipServiceDataCollector.h> #include <UtilHash.H> @@ -40,7 +40,7 @@ using namespace UE_TABLE; //------------------------------------------------------------------------------ -void CenMbaUeTable::addEntry( UE_TABLE::Type i_type, const CenAddr & i_addr ) +void MemUeTable::addEntry( UE_TABLE::Type i_type, const MemAddr & i_addr ) { // Create the new entry. UeTableData data ( i_type, i_addr ); @@ -69,7 +69,7 @@ void CenMbaUeTable::addEntry( UE_TABLE::Type i_type, const CenAddr & i_addr ) //------------------------------------------------------------------------------ -void CenMbaUeTable::addCapData( CaptureData & io_cd ) +void MemUeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) { static const size_t sz_word = sizeof(CPU_WORD); @@ -84,27 +84,26 @@ void CenMbaUeTable::addCapData( CaptureData & io_cd ) for ( UeTable::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; data[sz_actData ] = it->count; data[sz_actData+1] = it->type << 4; // 4 bits to spare. - data[sz_actData+2] = (mrnk << 5) | (srnk << 2) | (svld << 1) | row0; - data[sz_actData+3] = row1_8; - data[sz_actData+4] = row9_16; - data[sz_actData+5] = (bnk << 4) | col0_3; - data[sz_actData+6] = col4_11; + data[sz_actData+2] = (mrnk << 5) | (srnk << 2) | row0_1; + data[sz_actData+3] = row2_9; + data[sz_actData+4] = row10_17; + data[sz_actData+5] = (bnk << 3) | col0; // 2 bits to spare in between. + data[sz_actData+6] = col1_8; sz_actData += ENTRY_SIZE; } @@ -118,7 +117,7 @@ void CenMbaUeTable::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_UE_TABLE"), bs ); + io_cd.Add( i_chip->getTrgt(), Util::hashString("MEM_UE_TABLE"), bs ); } } diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H index 5c7c913d7..e683634f3 100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaUeTable.H $ */ +/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2015 */ +/* Contributors Listed Below - COPYRIGHT 2013,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,18 +23,18 @@ /* */ /* IBM_PROLOG_END_TAG */ -#ifndef __prdfCenMbaUeTable_H -#define __prdfCenMbaUeTable_H +#ifndef __prdfMemUeTable_H +#define __prdfMemUeTable_H -/** @file prdfCenMbaUeTable.H */ +/** @file prdfMemUeTable.H */ -// Framwork includes +// Framework includes #include <iipCaptureData.h> -#include <prdfParserEnums.H> -#include <prdfPlatServices.H> +#include <prdfExtensibleChip.H> -// Pegasus includes -#include <prdfCenAddress.H> +// Platform includes +#include <prdfMemAddress.H> +#include <prdfParserEnums.H> // Other includes #include <list> @@ -44,10 +44,10 @@ namespace PRDF /** * @brief A table of memory UEs. - * @note Only one of these tables will exists per MBA. + * @note Only one of these tables will exists per MBA/MCA. * @note So far, this table is used only for FFDC. */ -class CenMbaUeTable +class MemUeTable { private: // constants, enums @@ -61,27 +61,20 @@ class CenMbaUeTable public: // functions /** - * @brief Constructor - * @param i_mbaTrgt An MBA target. - */ - explicit CenMbaUeTable( TARGETING::TargetHandle_t i_mbaTrgt ) : - iv_mbaTrgt( i_mbaTrgt ) - {} - - /** * @brief Will attempt to add a new entry to the table. * @note If an entry already exists, the entry's count is incremented and * moved to the end of the queue. * @param i_type See enum UE_TABLE::Type. * @param i_addr The address in which the UE occurred. */ - void addEntry( UE_TABLE::Type i_type, const CenAddr & i_addr ); + void addEntry( UE_TABLE::Type i_type, const MemAddr & i_addr ); /** * @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 @@ -89,7 +82,7 @@ class CenMbaUeTable struct UeTableData { UE_TABLE::Type type; ///< See enum UE_TABLE::Type - CenAddr addr; ///< The address in which the UE occurred + MemAddr addr; ///< The address in which the UE occurred uint8_t count; ///< Number of times the entry is detected /** @brief Default constructor. */ @@ -100,7 +93,7 @@ class CenMbaUeTable * @param i_type See enum UE_TABLE::Type. * @param i_addr The address in which the UE occurred. */ - UeTableData( UE_TABLE::Type i_type, const CenAddr & i_addr ) : + UeTableData( UE_TABLE::Type i_type, const MemAddr & i_addr ) : type(i_type), addr(i_addr), count(1) {} @@ -115,9 +108,6 @@ class CenMbaUeTable private: // instance variables - /** MBA associated with this table. */ - TARGETING::TargetHandle_t iv_mbaTrgt; - /** A FIFO that stores the latest memory UE addresses and their types. This * is not a pure FIFO, because if a new entry matches an existing entry, * the existing entries count is incremented and it is moved to the end of @@ -129,5 +119,5 @@ class CenMbaUeTable } // end namespace PRDF -#endif // __prdfCenMbaUeTable_H +#endif // __prdfMemUeTable_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 0c84eee83..a41412827 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 @@ -41,6 +41,7 @@ prd_incpath += ${PRD_SRC_PATH}/common/plat/mem prd_obj += prdfMemAddress.o prd_obj += prdfMemSymbol.o prd_obj += prdfMemoryMru.o +prd_obj += prdfMemUeTable.o # rule plugin related |