summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorCaleb Palmer <cnpalmer@us.ibm.com>2018-03-28 13:41:01 -0500
committerZane C. Shelley <zshelle@us.ibm.com>2018-04-12 22:19:00 -0400
commit0c5b62c1df484f4fd6549f1ba9420a8e24791d9f (patch)
tree0c266ee30a8afa0a76ef963519ef719755818bea /src/usr
parent18dba5172c7d022d5b5b119d758fe167868cb00d (diff)
downloadtalos-hostboot-0c5b62c1df484f4fd6549f1ba9420a8e24791d9f.tar.gz
talos-hostboot-0c5b62c1df484f4fd6549f1ba9420a8e24791d9f.zip
PRD: IPL VCM for Centaur
Change-Id: I881eea3fdbac2e644f7df6b001ffe63cf86ddf33 RTC: 189615 RTC: 169933 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56902 Tested-by: Jenkins Server <pfd-jenkins+hostboot@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/57037 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@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>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H22
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemDqBitmap.C6
-rw-r--r--src/usr/diag/prdf/common/plat/mem/prdfMemEccAnalysis.C90
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C94
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices_ipl.C19
-rw-r--r--src/usr/diag/prdf/plat/prdfPlatServices_ipl.H9
6 files changed, 154 insertions, 86 deletions
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H
index 5d38a318b..f883653cf 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H
+++ b/src/usr/diag/prdf/common/plat/mem/prdfCenMbaDataBundle.H
@@ -37,6 +37,9 @@
#include <prdfMemTdCtlr.H>
+ #ifndef __HOSTBOOT_RUNTIME
+ #include <prdfMemIplCeStats.H>
+ #endif
#endif
namespace PRDF
@@ -64,6 +67,7 @@ class MbaDataBundle : public DataBundle
#if defined(__HOSTBOOT_MODULE) && !defined(__HOSTBOOT_RUNTIME)
delete iv_sfCmd; iv_sfCmd = nullptr;
+ delete iv_iplCeStats; iv_iplCeStats = nullptr;
#endif
}
@@ -84,6 +88,19 @@ class MbaDataBundle : public DataBundle
return iv_tdCtlr;
}
+ #ifndef __HOSTBOOT_RUNTIME
+ /** @return The IPL CE statistics object. */
+ MemIplCeStats<TARGETING::TYPE_MBA> * getIplCeStats()
+ {
+ if ( nullptr == iv_iplCeStats )
+ {
+ iv_iplCeStats = new MemIplCeStats<TARGETING::TYPE_MBA>( iv_chip );
+ }
+
+ return iv_iplCeStats;
+ }
+ #endif
+
#endif
private: // instance variables
@@ -96,6 +113,11 @@ class MbaDataBundle : public DataBundle
/** The Targeted Diagnostics controller. */
MemTdCtlr<TARGETING::TYPE_MBA> * iv_tdCtlr = nullptr;
+ #ifndef __HOSTBOOT_RUNTIME
+ /** MNFG IPL CE statistics. */
+ MemIplCeStats<TARGETING::TYPE_MBA> * iv_iplCeStats = nullptr;
+ #endif
+
#endif
public: // instance variables
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemDqBitmap.C b/src/usr/diag/prdf/common/plat/mem/prdfMemDqBitmap.C
index c417cc11f..cabaf8979 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemDqBitmap.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemDqBitmap.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -500,7 +500,7 @@ uint32_t setDramInVpd<TARGETING::TYPE_MCA>( ExtensibleChip * i_chip,
const MemRank & i_rank,
MemSymbol i_symbol )
{
- #define PRDF_FUNC "[MemDqBitmap::getSymbolList] "
+ #define PRDF_FUNC "[MemDqBitmap::setDramInVpd] "
uint32_t o_rc = SUCCESS;
@@ -546,7 +546,7 @@ uint32_t setDramInVpd<TARGETING::TYPE_MBA>( ExtensibleChip * i_chip,
const MemRank & i_rank,
MemSymbol i_symbol )
{
- #define PRDF_FUNC "[MemDqBitmap::getSymbolList] "
+ #define PRDF_FUNC "[MemDqBitmap::setDramInVpd] "
uint32_t o_rc = SUCCESS;
diff --git a/src/usr/diag/prdf/common/plat/mem/prdfMemEccAnalysis.C b/src/usr/diag/prdf/common/plat/mem/prdfMemEccAnalysis.C
index 54f607991..89a9a8b15 100644
--- a/src/usr/diag/prdf/common/plat/mem/prdfMemEccAnalysis.C
+++ b/src/usr/diag/prdf/common/plat/mem/prdfMemEccAnalysis.C
@@ -32,6 +32,7 @@
#include <prdfMemDqBitmap.H>
#include <prdfP9McaDataBundle.H>
#include <prdfP9McaExtraSig.H>
+#include <prdfPlatServices.H>
#ifdef __HOSTBOOT_RUNTIME
#include <prdfMemDynDealloc.H>
@@ -91,7 +92,7 @@ uint32_t handleMemUe<TYPE_MCA>( ExtensibleChip * i_chip, const MemAddr & i_addr,
UE_TABLE::Type i_type,
STEP_CODE_DATA_STRUCT & io_sc )
{
- #define PRDF_FUNC "[MemEcc::handleMemUe] "
+ #define PRDF_FUNC "[MemEcc::handleMemUe<TYPE_MCA>] "
PRDF_ASSERT( nullptr != i_chip );
PRDF_ASSERT( TYPE_MCA == i_chip->getType() );
@@ -143,11 +144,91 @@ uint32_t handleMemUe<TYPE_MBA>( ExtensibleChip * i_chip, const MemAddr & i_addr,
UE_TABLE::Type i_type,
STEP_CODE_DATA_STRUCT & io_sc )
{
+ #define PRDF_FUNC "[MemEcc::handleMemUe<TYPE_MBA>] "
+
PRDF_ASSERT( nullptr != i_chip );
PRDF_ASSERT( TYPE_MBA == i_chip->getType() );
- return __handleMemUe<TYPE_MBA,MbaDataBundle *>( i_chip, i_addr,
- i_type, io_sc );
+ uint32_t o_rc = SUCCESS;
+
+ do
+ {
+ #if !defined(__HOSTBOOT_RUNTIME) && defined(__HOSTBOOT_MODULE)
+
+ // At IPL time we want to try avoiding calling out both DIMMs on a
+ // rank if possible, so we use mssIplUeIsolation to just callout
+ // the dimms with bad bits instead of calling out the entire rank. At
+ // runtime we can't do this to preserve data integrity.
+
+ MbaDataBundle * mbadb = getMbaDataBundle( i_chip );
+
+ MemDqBitmap<DIMMS_PER_RANK::MBA> l_dqBitmap;
+ o_rc = mssIplUeIsolation<DIMMS_PER_RANK::MBA>( i_chip->getTrgt(),
+ i_addr.getRank(), l_dqBitmap );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "mssIplUeIsolation(0x%08x, 0x%02x) failed",
+ i_chip->getHuid(), i_addr.getRank().getKey() );
+ break;
+ }
+
+ // Add UE data to capture data
+ l_dqBitmap.getCaptureData( io_sc.service_data->GetCaptureData() );
+
+ // Add all DIMMs with bad bits to the callout list.
+ for ( uint8_t ps = 0; ps < DIMMS_PER_RANK::MBA; ps++ )
+ {
+ bool badDqs = false;
+ o_rc = l_dqBitmap.badDqs( badDqs, ps );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "badDqs(%d) failed", ps );
+ break;
+ }
+
+ if ( !badDqs ) continue;
+
+ TargetHandle_t l_dimm = getConnectedDimm( i_chip->getTrgt(),
+ i_addr.getRank(), ps );
+ if ( l_dimm == nullptr ) continue;
+
+ io_sc.service_data->SetCallout( l_dimm, MRU_HIGH );
+
+ if ( isMfgCeCheckingEnabled() )
+ {
+ // As we are doing callout for UE, we dont need to do callout
+ // during CE for this rank on given port
+ mbadb->getIplCeStats()->banAnalysis(
+ i_addr.getRank().getDimmSlct(), ps );
+ }
+ }
+
+ // Make the error log predictive.
+ io_sc.service_data->setServiceCall();
+
+ // Add entry to UE table.
+ MbaDataBundle * db =
+ static_cast<MbaDataBundle *>(i_chip->getDataBundle());
+ db->iv_ueTable.addEntry( i_type, i_addr );
+
+ #else
+
+ o_rc = __handleMemUe<TYPE_MBA, MbaDataBundle *>( i_chip, i_addr,
+ i_type, io_sc );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "__handleMemUe(0x%08x,%d) failed",
+ i_chip->getHuid(), i_type );
+ break;
+ }
+
+ #endif
+
+ }while(0);
+
+ return o_rc;
+
+ #undef PRDF_FUNC
}
//------------------------------------------------------------------------------
@@ -440,6 +521,9 @@ uint32_t handleMpe( ExtensibleChip * i_chip, const MemRank & i_rank,
template
uint32_t handleMpe<TYPE_MCA, McaDataBundle *>( ExtensibleChip * i_chip,
const MemRank & i_rank, STEP_CODE_DATA_STRUCT & io_sc, bool i_isFetch );
+template
+uint32_t handleMpe<TYPE_MBA, MbaDataBundle *>( ExtensibleChip * i_chip,
+ const MemRank & i_rank, STEP_CODE_DATA_STRUCT & io_sc, bool i_isFetch );
//------------------------------------------------------------------------------
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
index f4c75efb8..bd8a3fde2 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemVcm_ipl.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* Contributors Listed Below - COPYRIGHT 2016,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -122,22 +122,30 @@ uint32_t VcmEvent<T>::cleanup( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
-// Avoid linker errors with the template.
-template class VcmEvent<TYPE_MCA>;
-template class VcmEvent<TYPE_MBA>;
+template<TARGETING::TYPE T>
+bool __iueCheck( uint32_t i_eccAttns );
-//##############################################################################
-//
-// Specializations for MCA
-//
-//##############################################################################
+template<>
+bool __iueCheck<TYPE_MCA>( uint32_t i_eccAttns )
+{
+ return ( 0 != (i_eccAttns & MAINT_IUE) );
+}
template<>
-uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
- STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
+bool __iueCheck<TYPE_MBA>( uint32_t i_eccAttns )
{
- #define PRDF_FUNC "[VcmEvent<TYPE_MCA>::checkEcc] "
+ // IUES are reported via RCE ETE on Centaur
+ return ( 0 != (i_eccAttns & MAINT_RCE_ETE) );
+}
+
+//------------------------------------------------------------------------------
+
+template<TARGETING::TYPE T>
+uint32_t VcmEvent<T>::checkEcc( const uint32_t & i_eccAttns,
+ STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_done )
+{
+ #define PRDF_FUNC "[VcmEvent<T>::checkEcc] "
uint32_t o_rc = SUCCESS;
@@ -146,7 +154,7 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
// IUEs are reported as UEs during read operations. Therefore, we will
// treat IUEs like UEs for these scrub operations simply to maintain
// consistency during all of Memory Diagnostics.
- if ( (i_eccAttns & MAINT_UE) || (i_eccAttns & MAINT_IUE) )
+ if ( (i_eccAttns & MAINT_UE) || __iueCheck<T>(i_eccAttns) )
{
PRDF_TRAC( PRDF_FUNC "UE Detected: 0x%08x,0x%02x",
iv_chip->getHuid(), getKey() );
@@ -159,7 +167,7 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
// At this point we don't actually have an address for the UE. The
// best we can do is get the address in which the command stopped.
MemAddr addr;
- o_rc = getMemMaintAddr<TYPE_MCA>( iv_chip, addr );
+ o_rc = getMemMaintAddr<T>( iv_chip, addr );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed",
@@ -167,8 +175,8 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
break;
}
- o_rc = MemEcc::handleMemUe<TYPE_MCA>( iv_chip, addr,
- UE_TABLE::SCRUB_UE, io_sc );
+ o_rc = MemEcc::handleMemUe<T>( iv_chip, addr, UE_TABLE::SCRUB_UE,
+ io_sc );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "handleMemUe(0x%08x,0x%02x) failed",
@@ -187,55 +195,11 @@ uint32_t VcmEvent<TYPE_MCA>::checkEcc( const uint32_t & i_eccAttns,
#undef PRDF_FUNC
}
-//##############################################################################
-//
-// Specializations for MBA
-//
-//##############################################################################
-
-template<>
-uint32_t VcmEvent<TYPE_MBA>::checkEcc( const uint32_t & i_eccAttns,
- STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
-{
- #define PRDF_FUNC "[VcmEvent<TYPE_MBA>::checkEcc] "
-
- uint32_t o_rc = SUCCESS;
-
- do
- {
- // IUEs (reported via RCE ETE) are reported as UEs during read
- // operations. Therefore, we will treat IUEs like UEs for these scrub
- // operations simply to maintain consistency during all of Memory
- // Diagnostics.
- if ( (i_eccAttns & MAINT_UE) || (i_eccAttns & MAINT_RCE_ETE) )
- {
- PRDF_TRAC( PRDF_FUNC "UE Detected: 0x%08x,0x%02x",
- iv_chip->getHuid(), getKey() );
-
- io_sc.service_data->setSignature( iv_chip->getHuid(),
- (i_eccAttns & MAINT_UE)
- ? PRDFSIG_MaintUE
- : PRDFSIG_MaintRETRY_CTE );
- // TODO: RTC 157888
- // - Call mssIplUeIsolation() and add all DIMMs with bad bits to the
- // callout list.
- // - Make the error log predictive.
- // - Might be able to tuck this into MemEcc::handleMemUe().
- PRDF_ERR( PRDF_FUNC "function not implemented yet" );
-
- // Leave the mark in place and abort this procedure.
- o_done = true;
- }
-
- } while (0);
-
- return o_rc;
-
- #undef PRDF_FUNC
-}
-
//------------------------------------------------------------------------------
+// Avoid linker errors with the template.
+template class VcmEvent<TYPE_MCA>;
+template class VcmEvent<TYPE_MBA>;
+
} // end namespace PRDF
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C
index 58c6e63ce..206deb85a 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C
+++ b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.C
@@ -210,20 +210,20 @@ uint32_t mssRestoreDramRepairs<TYPE_MBA>( TargetHandle_t i_target,
//------------------------------------------------------------------------------
-
-/* TODO RTC 157888
-int32_t mssIplUeIsolation( TargetHandle_t i_mba, const CenRank & i_rank,
- CenDqBitmap & o_bitmap )
+template<>
+uint32_t mssIplUeIsolation( TargetHandle_t i_mba, const MemRank & i_rank,
+ MemDqBitmap<DIMMS_PER_RANK::MBA> & o_bitmap )
{
#define PRDF_FUNC "[PlatServices::mssIplUeIsolation] "
- int32_t o_rc = SUCCESS;
+ uint32_t o_rc = SUCCESS;
- uint8_t data[MBA_DIMMS_PER_RANK][DIMM_DQ_RANK_BITMAP_SIZE];
+ uint8_t data[DIMMS_PER_RANK::MBA][DQ_BITMAP::BITMAP_SIZE];
errlHndl_t errl = NULL;
- FAPI_INVOKE_HWP( errl, mss_IPL_UE_isolation, getFapiTarget(i_mba),
- i_rank.getMaster(), data );
+ fapi2::Target<fapi2::TARGET_TYPE_MBA> fapiMba( i_mba );
+ FAPI_INVOKE_HWP( errl, mss_IPL_UE_isolation, fapiMba, i_rank.getMaster(),
+ data );
if ( NULL != errl )
{
PRDF_ERR( PRDF_FUNC "mss_IPL_UE_isolation() failed: MBA=0x%08x "
@@ -233,14 +233,13 @@ int32_t mssIplUeIsolation( TargetHandle_t i_mba, const CenRank & i_rank,
}
else
{
- o_bitmap = CenDqBitmap ( i_mba, i_rank, data );
+ o_bitmap = MemDqBitmap<DIMMS_PER_RANK::MBA>( i_mba, i_rank, data );
}
return o_rc;
#undef PRDF_FUNC
}
-*/
//##############################################################################
//## Nimbus Maintenance Command wrappers
diff --git a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.H b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.H
index 5c7a57772..61a5ef422 100644
--- a/src/usr/diag/prdf/plat/prdfPlatServices_ipl.H
+++ b/src/usr/diag/prdf/plat/prdfPlatServices_ipl.H
@@ -91,11 +91,10 @@ uint32_t mssRestoreDramRepairs( TARGETING::TargetHandle_t i_target,
* @param o_bitmap DQ bitmap container.
* @return Non-SUCCESS in internal function fails, SUCCESS otherwise.
*/
-/* TODO RTC 157888
-int32_t mssIplUeIsolation( TARGETING::TargetHandle_t i_mba,
- const CenRank & i_rank,
- CenDqBitmap & o_bitmap );
-*/
+template<DIMMS_PER_RANK D>
+uint32_t mssIplUeIsolation( TARGETING::TargetHandle_t i_mba,
+ const MemRank & i_rank,
+ MemDqBitmap<D> & o_bitmap );
//##############################################################################
//## Nimbus/Centaur Maintenance Command wrappers
OpenPOWER on IntegriCloud