diff options
author | Zane Shelley <zshelle@us.ibm.com> | 2017-02-16 17:02:54 -0600 |
---|---|---|
committer | Zane C. Shelley <zshelle@us.ibm.com> | 2017-02-27 10:41:06 -0500 |
commit | 33f3061fdea98fd2e930407aae99231c0a68b8ff (patch) | |
tree | 71be0c33adc467a756310e373aeecc645ec4c108 /src/usr/diag/prdf/common | |
parent | ee946e0c40f8274fab76da7db28a5807c1c99239 (diff) | |
download | talos-hostboot-33f3061fdea98fd2e930407aae99231c0a68b8ff.tar.gz talos-hostboot-33f3061fdea98fd2e930407aae99231c0a68b8ff.zip |
PRD: add CE table to default capture data
Change-Id: I3add30d1700289dde4ee6059bdafb8d22edd212a
RTC: 165382
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36752
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/37014
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/diag/prdf/common')
6 files changed, 40 insertions, 17 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C index 033aca09b..500fbcd72 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 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -53,8 +53,11 @@ void addEccData<TYPE_MCA>( ExtensibleChip * i_chip, CaptureData & cd = io_sc.service_data->GetCaptureData(); McaDataBundle * db = getMcaDataBundle( i_chip ); + // Add CE table to capture data. + db->iv_ceTable.addCapData( cd ); + // Add UE table to capture data. - db->iv_ueTable.addCapData( i_chip, cd ); + db->iv_ueTable.addCapData( cd ); } template<> diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C index 69b2894e0..121aa088a 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C @@ -174,7 +174,7 @@ void MemCeTable::getMnfgCounts( const MemRank & i_rank, //------------------------------------------------------------------------------ -void MemCeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) +void MemCeTable::addCapData( CaptureData & io_cd ) { static const size_t sz_word = sizeof(CPU_WORD); @@ -191,16 +191,16 @@ void MemCeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) uint8_t isMba = 0; uint8_t mbaPos = 0; uint8_t rcType = CEN_SYMBOL::WIRING_INVALID; - if ( TYPE_MBA == i_chip->getType() ) + if ( TYPE_MBA == iv_chip->getType() ) { isMba = 1; - mbaPos = getTargetPosition( i_chip->getTrgt() ); + mbaPos = getTargetPosition( iv_chip->getTrgt() ); /* TODO: RTC 157888 - if ( SUCCESS != getMemBufRawCardType(i_chip->getTrgt(), rcType) ) + if ( SUCCESS != getMemBufRawCardType(iv_chip->getTrgt(), rcType) ) { PRDF_ERR( "[MemCeTable::addCapData] getMemBufRawCardType(0x%08x) " - "failed", i_chip->getHuid() ); + "failed", iv_chip->getHuid() ); rcType = CEN_SYMBOL::WIRING_INVALID; // Just in case. } */ @@ -257,7 +257,7 @@ void MemCeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) // Add data to capture data. BitString bs ( sz_actData*8, (CPU_WORD *) &data ); - io_cd.Add( i_chip->getTrgt(), Util::hashString("MEM_CE_TABLE"), bs ); + io_cd.Add( iv_chip->getTrgt(), Util::hashString("MEM_CE_TABLE"), bs ); } } diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H index 00b38d691..dadd0d380 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H @@ -77,6 +77,14 @@ class MemCeTable public: // functions /** + * @brief Constructor. + * @param i_chip MCA or MBA associated with this data. + */ + explicit MemCeTable( ExtensibleChip * i_chip ) : + iv_chip( i_chip ) + {} + + /** * @brief Will attempt to add a new entry to the table. * * If an entry already exists, the entry's count is incremented. Otherwise, @@ -115,10 +123,9 @@ class MemCeTable /** * @brief Gathers all table data to be stored in capture data. - * @param i_chip An MCA or MBA chip. * @param io_cd Capture data struct. */ - void addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ); + void addCapData( CaptureData & io_cd ); private: // structs, typedefs @@ -167,6 +174,8 @@ class MemCeTable private: // instance variables + ExtensibleChip * iv_chip; ///< MCA or MBA associated with this data. + /** A storage container for memory fetch CE errors. */ CeTable iv_table; diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C index f29c3c7d4..dcd11754b 100755 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C @@ -69,7 +69,7 @@ void MemUeTable::addEntry( UE_TABLE::Type i_type, const MemAddr & i_addr ) //------------------------------------------------------------------------------ -void MemUeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) +void MemUeTable::addCapData( CaptureData & io_cd ) { static const size_t sz_word = sizeof(CPU_WORD); @@ -117,7 +117,7 @@ void MemUeTable::addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ) // Add data to capture data. BitString bs ( sz_actData*8, (CPU_WORD *) &data ); - io_cd.Add( i_chip->getTrgt(), Util::hashString("MEM_UE_TABLE"), bs ); + io_cd.Add( iv_chip->getTrgt(), Util::hashString("MEM_UE_TABLE"), bs ); } } diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H index e683634f3..21f7ff9f2 100755 --- a/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2013,2016 */ +/* Contributors Listed Below - COPYRIGHT 2013,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -61,6 +61,14 @@ class MemUeTable public: // functions /** + * @brief Constructor. + * @param i_chip MCA or MBA associated with this data. + */ + explicit MemUeTable( ExtensibleChip * i_chip ) : + iv_chip( i_chip ) + {} + + /** * @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. @@ -71,10 +79,9 @@ class MemUeTable /** * @brief Gathers all table data to be stored in capture data. - * @param i_chip An MCA or MBA chip. * @param io_cd Capture data struct. */ - void addCapData( ExtensibleChip * i_chip, CaptureData & io_cd ); + void addCapData( CaptureData & io_cd ); private: // structs, typedefs @@ -108,6 +115,8 @@ class MemUeTable private: // instance variables + ExtensibleChip * iv_chip; ///< MCA or MBA associated with this data. + /** 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 diff --git a/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H b/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H index 2adcbddf3..7540a861e 100644 --- a/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H +++ b/src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -30,6 +30,7 @@ #include <prdfExtensibleChip.H> // Platform includes +#include <prdfMemCeTable.H> #include <prdfMemUeTable.H> namespace PRDF @@ -45,7 +46,7 @@ class McaDataBundle : public DataBundle * @param i_chip An MCA chip. */ explicit McaDataBundle( ExtensibleChip * i_chip ) : - iv_ueTable() + iv_ceTable(i_chip), iv_ueTable(i_chip) {} /** @brief Destructor */ @@ -59,6 +60,7 @@ class McaDataBundle : public DataBundle public: // instance variables + MemCeTable iv_ceTable; ///< CE table for FFDC MemUeTable iv_ueTable; ///< UE table for FFDC }; |