Skip to content

Commit

Permalink
PRD: ATTR_EFF_DRAM_ROWS and ATTR_EFF_DRAM_COLS not used on Nimbus
Browse files Browse the repository at this point in the history
Change-Id: Ie7f841a29a27144a12f3143f5dfba3c75d59ea9f
RTC: 199845
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66824
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: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66825
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
  • Loading branch information
zane131 committed Oct 9, 2018
1 parent afa0689 commit 965a9ea
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 45 deletions.
41 changes: 13 additions & 28 deletions src/usr/diag/prdf/common/plat/prdfTargetServices.C
Original file line number Diff line number Diff line change
Expand Up @@ -1389,39 +1389,24 @@ uint8_t getDramGen<TYPE_MBA>( TargetHandle_t i_trgt )

//------------------------------------------------------------------------------

int32_t getDimmRowCol( TARGETING::TargetHandle_t i_mba, uint8_t & o_rowNum,
uint8_t & o_colNum )
template<>
uint8_t getRowNumConfig<TYPE_MBA>( TARGETING::TargetHandle_t i_trgt )
{
#define PRDF_FUNC "[PlatServices::getDimmRowCol] "

int32_t o_rc = FAIL;
do
{
if ( TYPE_MBA != getTargetType( i_mba ) )
{
PRDF_ERR( PRDF_FUNC "Invalid Target. HUID:0X%08X",
getHuid( i_mba ) );
break;
}
PRDF_ASSERT( nullptr != i_trgt );
PRDF_ASSERT( TYPE_MBA == getTargetType(i_trgt) );

ATTR_MODEL_type l_procModel = getChipModel( getMasterProc() );
if ( MODEL_CUMULUS == l_procModel )
{
o_rowNum = i_mba->getAttr<ATTR_CEN_EFF_DRAM_ROWS>();
o_colNum = i_mba->getAttr<ATTR_CEN_EFF_DRAM_COLS>();
}
else // NIMBUS or something without CENTAURs
{
o_rowNum = i_mba->getAttr<ATTR_EFF_DRAM_ROWS>();
o_colNum = i_mba->getAttr<ATTR_EFF_DRAM_COLS>();
}
return i_trgt->getAttr<ATTR_CEN_EFF_DRAM_ROWS>();
}

o_rc = SUCCESS;
//------------------------------------------------------------------------------

}while(0);
template<>
uint8_t getColNumConfig<TYPE_MBA>( TARGETING::TargetHandle_t i_trgt )
{
PRDF_ASSERT( nullptr != i_trgt );
PRDF_ASSERT( TYPE_MBA == getTargetType(i_trgt) );

return o_rc;
#undef PRDF_FUNC
return i_trgt->getAttr<ATTR_CEN_EFF_DRAM_COLS>();
}

//------------------------------------------------------------------------------
Expand Down
18 changes: 11 additions & 7 deletions src/usr/diag/prdf/common/plat/prdfTargetServices.H
Original file line number Diff line number Diff line change
Expand Up @@ -420,14 +420,18 @@ template<TARGETING::TYPE T>
uint8_t getDramGen( TARGETING::TargetHandle_t i_trgt );

/**
* @brief Get DIMM number of rows and columns
* @param i_mba MBA target
* @param o_rowNum Number of rows
* @param o_colNum Number of columns
* @return Non-SUCCESS if internal functions fail, SUCCESS otherwise.
* @param i_trgt MBA target
* @return The number of row bits configured on this memory target.
*/
template<TARGETING::TYPE T>
uint8_t getRowNumConfig( TARGETING::TargetHandle_t i_trgt );

/**
* @param i_trgt MBA target
* @return The number of column bits configured on this memory target.
*/
int32_t getDimmRowCol( TARGETING::TargetHandle_t i_mba, uint8_t & o_rowNum,
uint8_t & o_colNum );
template<TARGETING::TYPE T>
uint8_t getColNumConfig( TARGETING::TargetHandle_t i_trgt );

/**
* @brief Returns a sorted list of configured master ranks for an MCA or MBA.
Expand Down
14 changes: 4 additions & 10 deletions src/usr/diag/prdf/plat/mem/prdfMemDynDealloc.C
Original file line number Diff line number Diff line change
Expand Up @@ -503,18 +503,12 @@ int32_t __getPortAddr<TYPE_MBA>( ExtensibleChip * i_chip, MemAddr i_addr,
uint64_t mrnkBits = ranks2bits( num_mrnk );
uint64_t srnkBits = ranks2bits( num_srnk );

// Get the number of configured address bits for the row and column.
uint8_t rowBits = getRowNumConfig<TYPE_MBA>( mba );
uint8_t colBits = getColNumConfig<TYPE_MBA>( mba );

do
{
// Get the number of configured address bits for the row and column.
uint8_t rowBits, colBits;
o_rc = getDimmRowCol( mba, rowBits, colBits );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getDimmConfig() failed. HUID:0x%08X",
i_chip->GetId());
break;
}

// The attribute used in getDimmRowCol() returns a value for colBits
// which includes c2-c0. Those bits are tied to zero and are not
// included in col. Therefore, we need to subtract 3 to get the real
Expand Down

0 comments on commit 965a9ea

Please sign in to comment.