Skip to content

Commit

Permalink
PRD: Remove ForceRead() from MemAddr utils
Browse files Browse the repository at this point in the history
After manually stopping background scrubbing, we refresh all the
required registers. There is no need to do the ForceRead() now in the
MemAddr utility functions anymore.

Change-Id: I7c2cd53790c1d042bfdeff2c746d6b16a3db36e8
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/58809
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Benjamin J. Weisenbeck <bweisenb@us.ibm.com>
Reviewed-by: Caleb N. Palmer <cnpalmer@us.ibm.com>
Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com>
Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/59010
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 May 18, 2018
1 parent 4e78db3 commit 5370984
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions src/usr/diag/prdf/common/plat/mem/prdfMemAddress.C
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,8 @@ uint32_t getMemMaintAddr<TYPE_MCBIST>( ExtensibleChip * i_chip,
PRDF_ASSERT( TYPE_MCBIST == i_chip->getType() );

// Read the address register
// We need to use ForceRead() here because it is possible we needed to stop
// the maintenance command after capturing the initial register data.
SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister( "MCBMCAT" );
uint32_t o_rc = reg->ForceRead();
uint32_t o_rc = reg->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on MCBMCAT: i_chip=0x%08x",
Expand Down Expand Up @@ -296,13 +294,11 @@ uint32_t getMemMaintAddr<TYPE_MBA>( ExtensibleChip * i_chip, MemAddr & o_addr )
PRDF_ASSERT( TYPE_MBA == i_chip->getType() );

// Read the address register
// We need to use ForceRead() here because it is possible we needed to stop
// the maintenance command after capturing the initial register data.
SCAN_COMM_REGISTER_CLASS * reg = i_chip->getRegister( "MBMACA" );
uint32_t o_rc = reg->ForceRead();
uint32_t o_rc = reg->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on MCBMCAT: i_chip=0x%08x",
PRDF_ERR( PRDF_FUNC "Read() failed on MBMACA: i_chip=0x%08x",
i_chip->getHuid() );
}
else
Expand Down Expand Up @@ -334,17 +330,13 @@ uint32_t getMcbistMaintPort( ExtensibleChip * i_mcbChip,

o_mcaList.clear();

// Note that we will need to use ForceRead() on these registers because it is
// possible we needed to stop the maintenance command after capturing the
// initial register data.

SCAN_COMM_REGISTER_CLASS * mcbagra = i_mcbChip->getRegister( "MCBAGRA" );
SCAN_COMM_REGISTER_CLASS * mcbmcat = i_mcbChip->getRegister( "MCBMCAT" );
SCAN_COMM_REGISTER_CLASS * mcb_cntl = i_mcbChip->getRegister( "MCB_CNTL" );

do
{
o_rc = mcbagra->ForceRead();
o_rc = mcbagra->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on MCBAGRA: i_mcbChip=0x%08x",
Expand All @@ -358,7 +350,7 @@ uint32_t getMcbistMaintPort( ExtensibleChip * i_mcbChip,
uint8_t portMask = 0;
if ( !mcbagra->IsBitSet(10) || mcbagra->IsBitSet(11) ) // broadcast mode
{
o_rc = mcb_cntl->ForceRead();
o_rc = mcb_cntl->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on MCB_CNTL: "
Expand All @@ -370,7 +362,7 @@ uint32_t getMcbistMaintPort( ExtensibleChip * i_mcbChip,
}
else // non-broadcast mode
{
o_rc = mcbmcat->ForceRead();
o_rc = mcbmcat->Read();
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "Read() failed on MCBMCAT: "
Expand Down

0 comments on commit 5370984

Please sign in to comment.