diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2018-04-25 20:13:22 -0500 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2018-04-27 21:30:23 -0400 |
commit | 11c79b261c9e99c227137a494bba3d3a816deb08 (patch) | |
tree | ced1d90b8d1dc505ca008507afa3f507b6d371be /src/usr/diag/prdf | |
parent | cd594015a0572f591a63c579a8946080ec6341fa (diff) | |
download | talos-hostboot-11c79b261c9e99c227137a494bba3d3a816deb08.tar.gz talos-hostboot-11c79b261c9e99c227137a494bba3d3a816deb08.zip |
PRD: add MBA support for CE, UE, and RCE tables
Change-Id: Icdf97f8ad417900d9381cb1ae89c07f5b5a9a772
RTC: 187480
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/57854
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@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/57930
CI-Ready: Zane C. Shelley <zshelle@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>
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/prdfCenMbaDataBundle.H | 9 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C | 9 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.C) | 24 | ||||
-rwxr-xr-x[-rw-r--r--] | src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H (renamed from src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.H) | 36 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plat/mem/prdf_plat_mem.mk | 1 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfLogParse_common.C | 2 | ||||
-rw-r--r-- | src/usr/diag/prdf/common/plugins/prdfMemLogParse.C | 19 |
7 files changed, 46 insertions, 54 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H index 07fa0fd07..896ba1704 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H @@ -30,6 +30,8 @@ #include <prdfExtensibleChip.H> // Platform includes +#include <prdfMemCeTable.H> +#include <prdfMemRceTable.H> #include <prdfMemUeTable.H> #include <prdfPlatServices.H> @@ -56,7 +58,8 @@ class MbaDataBundle : public DataBundle * @param i_chip The MBA chip. */ explicit MbaDataBundle( ExtensibleChip * i_chip ) : - iv_chip(i_chip), iv_ueTable(i_chip) + iv_chip(i_chip), iv_ceTable(i_chip), iv_ueTable(i_chip), + iv_rceTable(i_chip) {} /** @brief Destructor. */ @@ -154,7 +157,9 @@ class MbaDataBundle : public DataBundle public: // instance variables - MemUeTable iv_ueTable; ///< UE table for FFDC + MemCeTable<TARGETING::TYPE_MBA> iv_ceTable; ///< CE table for FFDC + MemUeTable iv_ueTable; ///< UE table for FFDC + MemRceTable iv_rceTable; ///< RCE table for FFDC #if defined(__HOSTBOOT_MODULE) && !defined(__HOSTBOOT_RUNTIME) diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C index ceab917c4..6a4c16964 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -36,6 +36,7 @@ #include <utilmem.H> // Platform includes +#include <prdfCenMbaDataBundle.H> #include <prdfPlatServices.H> #include <prdfP9McaDataBundle.H> @@ -579,12 +580,11 @@ void addEccData<TYPE_MBA>( ExtensibleChip * i_chip, { PRDF_ASSERT( TYPE_MBA == i_chip->getType() ); -/* TODO: RTC 157888 CaptureData & cd = io_sc.service_data->GetCaptureData(); - CenMbaDataBundle * db = getMbaDataBundle( i_chip ); + MbaDataBundle * db = getMbaDataBundle( i_chip ); // Add UE table to capture data. - db->iv_ueTable.addCapData( i_chip, cd ); + db->iv_ueTable.addCapData( cd ); // Add CE table to capture data. db->iv_ceTable.addCapData( cd ); @@ -592,6 +592,7 @@ void addEccData<TYPE_MBA>( ExtensibleChip * i_chip, // Add RCE table to capture data. db->iv_rceTable.addCapData( cd ); +/* TODO: RTC 157888 // Add DRAM repairs data from hardware. captureDramRepairsData( i_chip->getTrgt(), cd ); diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C index 12c8776c5..9655db669 100644 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.C $ */ +/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.C $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,16 +23,15 @@ /* */ /* IBM_PROLOG_END_TAG */ -#include <prdfCenMbaRceTable.H> +#include <prdfMemRceTable.H> // Framwork includes #include <iipServiceDataCollector.h> #include <UtilHash.H> #include <prdfParserEnums.H> -// Pegasus includes -#include <prdfCenMbaThresholds.H> -#include <prdfCenAddress.H> +// Platform includes +#include <prdfMemThresholds.H> using namespace TARGETING; @@ -43,8 +42,8 @@ using namespace RCE_TABLE; //------------------------------------------------------------------------------ -bool CenMbaRceTable::addEntry( const CenRank & i_rank, - STEP_CODE_DATA_STRUCT & i_sc, uint8_t i_count ) +bool MemRceTable::addEntry( const MemRank & i_rank, + STEP_CODE_DATA_STRUCT & i_sc, uint8_t i_count ) { bool o_doTps = false; @@ -64,7 +63,7 @@ bool CenMbaRceTable::addEntry( const CenRank & i_rank, //------------------------------------------------------------------------------ -void CenMbaRceTable::flushEntry( const CenRank & i_rank ) +void MemRceTable::flushEntry( const MemRank & i_rank ) { RceTable::iterator it = iv_table.find( i_rank ); if ( iv_table.end() != it ) @@ -72,7 +71,7 @@ void CenMbaRceTable::flushEntry( const CenRank & i_rank ) } //------------------------------------------------------------------------------ -void CenMbaRceTable::addCapData( CaptureData & io_cd ) +void MemRceTable::addCapData( CaptureData & io_cd ) { static const size_t sz_word = sizeof(CPU_WORD); static const size_t sz_entryCnt = sizeof( uint8_t ); // entry count @@ -97,9 +96,8 @@ void CenMbaRceTable::addCapData( CaptureData & io_cd ) } uint32_t mrnk = it->first.getMaster(); // 3-bit uint32_t srnk = it->first.getSlave(); // 3-bit - uint32_t svld = it->first.isSlaveValid() ? 1 : 0; // 1-bit - data[sz_actData] = (mrnk << 5) | (srnk << 2) | (svld << 1); + data[sz_actData] = (mrnk << 5) | (srnk << 2); uint32_t count = it->second.getCount(); data[sz_actData + 1] = ( count > 255 ) ? 255 : count; sz_actData += ENTRY_SIZE; @@ -115,7 +113,7 @@ void CenMbaRceTable::addCapData( CaptureData & io_cd ) // Add data to capture data. BitString bs ( sz_actData*8, (CPU_WORD *) &data ); - io_cd.Add( iv_mbaTrgt, Util::hashString("MEM_RCE_TABLE"), bs ); + io_cd.Add( iv_chip->getTrgt(), Util::hashString("MEM_RCE_TABLE"), bs ); } } diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H index ea3382b90..f475c38d4 100644..100755 --- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaRceTable.H $ */ +/* $Source: src/usr/diag/prdf/common/plat/mem/prdfMemRceTable.H $ */ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,22 +23,24 @@ /* */ /* IBM_PROLOG_END_TAG */ -#ifndef __prdfCenMbaRceTable_H -#define __prdfCenMbaRceTable_H +#ifndef __prdfMemRceTable_H +#define __prdfMemRceTable_H -/** @file prdfCenMbaRceTable.H */ +/** @file prdfMemRceTable.H */ // Framwork includes #include <iipCaptureData.h> #include <prdfPlatServices.H> #include <prdfThresholdUtils.H> +// Platform includes +#include <prdfMemRank.H> + // Other includes #include <map> namespace PRDF { -class CenRank; /** * @brief A table of memory RCEs. @@ -46,7 +48,7 @@ class CenRank; * @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 CenMbaRceTable +class MemRceTable { public: // functions @@ -55,8 +57,8 @@ class CenMbaRceTable * @brief Constructor * @param i_mbaTrgt An MBA target. */ - explicit CenMbaRceTable( TARGETING::TargetHandle_t i_mbaTrgt ) : - iv_mbaTrgt( i_mbaTrgt ) + explicit MemRceTable( ExtensibleChip * i_chip ) : + iv_chip( i_chip ) {} /** @@ -68,17 +70,17 @@ class CenMbaRceTable * * @param i_rank rank. * @param i_sc The step code data struct. - * @param i_count RCE count. + * @param i_count RCE count. * @return TRUE if TPS is required, FALSE otherwise. */ - bool addEntry( const CenRank & i_rank, + bool addEntry( const MemRank & i_rank, STEP_CODE_DATA_STRUCT & i_sc, uint8_t i_count = 1 ); /** * @brief Flush entry covered by a rank. * @param i_rank The target rank. */ - void flushEntry( const CenRank & i_rank ); + void flushEntry( const MemRank & i_rank ); /** * @brief Gathers all table data to be stored in capture data. @@ -87,16 +89,16 @@ class CenMbaRceTable void addCapData( CaptureData & io_cd ); /** Default Constructor */ - CenMbaRceTable():iv_table(){} + MemRceTable():iv_table(){} private: // structs, typedefs - typedef std::map<CenRank, TimeBasedThreshold> RceTable; + typedef std::map<MemRank, TimeBasedThreshold> RceTable; private: // instance variables - /** MBA associated with this table. */ - TARGETING::TargetHandle_t iv_mbaTrgt; + /** The chip associated with this table. */ + ExtensibleChip * iv_chip; /** A storage container for memory RCE errors. */ RceTable iv_table; @@ -104,5 +106,5 @@ class CenMbaRceTable } // end namespace PRDF -#endif // __prdfCenMbaRceTable_H +#endif // __prdfMemRceTable_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 771f3359e..1a879a58b 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 @@ -44,6 +44,7 @@ prd_obj += prdfMemCeTable.o prd_obj += prdfMemDqBitmap.o prd_obj += prdfMemEccAnalysis.o prd_obj += prdfMemMark.o +prd_obj += prdfMemRceTable.o prd_obj += prdfMemSymbol.o prd_obj += prdfMemoryMru.o prd_obj += prdfMemUeTable.o diff --git a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C index 66a3339b0..21355d8b4 100644 --- a/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C +++ b/src/usr/diag/prdf/common/plugins/prdfLogParse_common.C @@ -453,12 +453,10 @@ bool parseCaptureData( void * i_buffer, uint32_t i_buflen, { parseIueCounts( sigData, sigDataSize, i_parser ); } -/* TODO: RTC 157888 else if ( Util::hashString("MEM_RCE_TABLE") == sigId ) { parseMemRceTable( sigData, sigDataSize, i_parser ); } -*/ else if ( Util::hashString("DRAM_REPAIRS_DATA") == sigId ) { parseDramRepairsData( sigData, sigDataSize, i_parser ); diff --git a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C index 8f71d5111..92eab3f01 100644 --- a/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C +++ b/src/usr/diag/prdf/common/plugins/prdfMemLogParse.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2017 */ +/* Contributors Listed Below - COPYRIGHT 2013,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -3229,7 +3229,6 @@ bool parseIueCounts( uint8_t * i_buffer, uint32_t i_buflen, //------------------------------------------------------------------------------ -/* TODO RTC 157888 bool parseMemRceTable( uint8_t * i_buffer, uint32_t i_buflen, ErrlUsrParser & i_parser ) { @@ -3249,23 +3248,12 @@ bool parseMemRceTable( uint8_t * i_buffer, uint32_t i_buflen, uint32_t mrnk = (i_buffer[idx ] >> 5) & 0x7; // 3-bit uint32_t srnk = (i_buffer[idx ] >> 2) & 0x7; // 3-bit - uint32_t svld = (i_buffer[idx ] >> 1) & 0x1; // 1-bit uint32_t count = i_buffer[idx+1]; // 8-bit - // Get the rank string. - char rank_str[DATA_SIZE] = ""; - if ( 1 == svld ) - { - snprintf( rank_str, DATA_SIZE, "m%ds%d", mrnk, srnk ); - } - else - { - snprintf( rank_str, DATA_SIZE, "m%d ", mrnk ); - } - // Build the data string. char data[DATA_SIZE] = ""; - snprintf( data, DATA_SIZE, "rank = %s count = %d", rank_str, count ); + snprintf( data, DATA_SIZE, "rank = m%ds%d count = %d", + mrnk, srnk, count ); // Print the line. i_parser.PrintString( "", data ); @@ -3273,7 +3261,6 @@ bool parseMemRceTable( uint8_t * i_buffer, uint32_t i_buflen, return rc; } -*/ //------------------------------------------------------------------------------ |