Skip to content

Commit

Permalink
PRD: add CE table to default capture data
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zane131 committed Feb 27, 2017
1 parent ee946e0 commit 33f3061
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 17 deletions.
7 changes: 5 additions & 2 deletions src/usr/diag/prdf/common/plat/mem/prdfMemCaptureData.C
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -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<>
Expand Down
12 changes: 6 additions & 6 deletions src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.C
Expand Up @@ -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);

Expand All @@ -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.
}
*/
Expand Down Expand Up @@ -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 );
}
}

Expand Down
13 changes: 11 additions & 2 deletions src/usr/diag/prdf/common/plat/mem/prdfMemCeTable.H
Expand Up @@ -76,6 +76,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.
*
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.C
Expand Up @@ -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);

Expand Down Expand Up @@ -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 );
}
}

Expand Down
15 changes: 12 additions & 3 deletions src/usr/diag/prdf/common/plat/mem/prdfMemUeTable.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2013,2016 */
/* Contributors Listed Below - COPYRIGHT 2013,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -60,6 +60,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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions src/usr/diag/prdf/common/plat/mem/prdfP9McaDataBundle.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016 */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand All @@ -30,6 +30,7 @@
#include <prdfExtensibleChip.H>

// Platform includes
#include <prdfMemCeTable.H>
#include <prdfMemUeTable.H>

namespace PRDF
Expand All @@ -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 */
Expand All @@ -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
};

Expand Down

0 comments on commit 33f3061

Please sign in to comment.