summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C')
-rw-r--r--src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C93
1 files changed, 70 insertions, 23 deletions
diff --git a/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C b/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C
index 70a6be7f2..9dbaeeb3c 100644
--- a/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C
+++ b/src/usr/diag/prdf/plat/mem/prdfMemDsd_ipl.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -30,6 +30,8 @@
#include <prdfMemDqBitmap.H>
#include <prdfMemDsd.H>
+#include <hwp_wrappers.H>
+
using namespace TARGETING;
namespace PRDF
@@ -37,18 +39,12 @@ namespace PRDF
using namespace PlatServices;
-//##############################################################################
-//
-// Specializations for MBA
-//
-//##############################################################################
-
-template<>
-uint32_t DsdEvent<TYPE_MBA>::checkEcc( const uint32_t & i_eccAttns,
- STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
+template<TARGETING::TYPE T>
+uint32_t DsdEvent<T>::checkEcc( const uint32_t & i_eccAttns,
+ STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_done )
{
- #define PRDF_FUNC "[DsdEvent<TYPE_MBA>::checkEcc] "
+ #define PRDF_FUNC "[DsdEvent<T>::checkEcc] "
uint32_t o_rc = SUCCESS;
@@ -71,7 +67,7 @@ uint32_t DsdEvent<TYPE_MBA>::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_MBA>( iv_chip, addr );
+ o_rc = getMemMaintAddr<T>( iv_chip, addr );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "getMemMaintAddr(0x%08x) failed",
@@ -79,8 +75,8 @@ uint32_t DsdEvent<TYPE_MBA>::checkEcc( const uint32_t & i_eccAttns,
break;
}
- o_rc = MemEcc::handleMemUe<TYPE_MBA>( 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",
@@ -101,12 +97,12 @@ uint32_t DsdEvent<TYPE_MBA>::checkEcc( const uint32_t & i_eccAttns,
//------------------------------------------------------------------------------
-template<>
-uint32_t DsdEvent<TYPE_MBA>::verifySpare( const uint32_t & i_eccAttns,
- STEP_CODE_DATA_STRUCT & io_sc,
- bool & o_done )
+template<TARGETING::TYPE T>
+uint32_t DsdEvent<T>::verifySpare( const uint32_t & i_eccAttns,
+ STEP_CODE_DATA_STRUCT & io_sc,
+ bool & o_done )
{
- #define PRDF_FUNC "[DsdEvent<TYPE_MBA>::verifySpare] "
+ #define PRDF_FUNC "[DsdEvent<T>::verifySpare] "
uint32_t o_rc = SUCCESS;
@@ -166,7 +162,7 @@ uint32_t DsdEvent<TYPE_MBA>::verifySpare( const uint32_t & i_eccAttns,
PRDFSIG_DsdDramSpared );
// Remove the chip mark.
- o_rc = MarkStore::clearChipMark<TYPE_MBA>( iv_chip, iv_rank );
+ o_rc = MarkStore::clearChipMark<T>( iv_chip, iv_rank );
if ( SUCCESS != o_rc )
{
PRDF_ERR( PRDF_FUNC "clearChipMark(0x%08x,0x%02x) failed",
@@ -190,7 +186,7 @@ uint32_t DsdEvent<TYPE_MBA>::verifySpare( const uint32_t & i_eccAttns,
template<>
uint32_t DsdEvent<TYPE_MBA>::startCmd()
{
- #define PRDF_FUNC "[DsdEvent::startCmd] "
+ #define PRDF_FUNC "[DsdEvent<TYPE_MBA>::startCmd] "
uint32_t o_rc = SUCCESS;
@@ -231,7 +227,54 @@ uint32_t DsdEvent<TYPE_MBA>::startCmd()
//------------------------------------------------------------------------------
template<>
-uint32_t DsdEvent<TYPE_MBA>::startNextPhase( STEP_CODE_DATA_STRUCT & io_sc )
+uint32_t DsdEvent<TYPE_OCMB_CHIP>::startCmd()
+{
+ #define PRDF_FUNC "[DsdEvent<TYPE_OCMB_CHIP>::startCmd] "
+
+ uint32_t o_rc = SUCCESS;
+
+ #ifdef CONFIG_AXONE
+
+ mss::mcbist::stop_conditions<mss::mc_type::EXPLORER> stopCond;
+
+ switch ( iv_phase )
+ {
+ case TD_PHASE_1:
+ // Start the steer cleanup procedure on this master rank.
+ o_rc = startTdSteerCleanup<TYPE_OCMB_CHIP>( iv_chip, iv_rank,
+ MASTER_RANK, stopCond );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "startTdSteerCleanup(0x%08x,0x%2x) failed",
+ iv_chip->getHuid(), getKey() );
+ }
+ break;
+
+ case TD_PHASE_2:
+ // Start the superfast read procedure on this master rank.
+ o_rc = startTdSfRead<TYPE_OCMB_CHIP>( iv_chip, iv_rank, MASTER_RANK,
+ stopCond );
+ if ( SUCCESS != o_rc )
+ {
+ PRDF_ERR( PRDF_FUNC "startTdSfRead(0x%08x,0x%2x) failed",
+ iv_chip->getHuid(), getKey() );
+ }
+ break;
+
+ default: PRDF_ASSERT( false ); // invalid phase
+ }
+
+ #endif
+
+ return o_rc;
+
+ #undef PRDF_FUNC
+}
+
+//------------------------------------------------------------------------------
+
+template<TARGETING::TYPE T>
+uint32_t DsdEvent<T>::startNextPhase( STEP_CODE_DATA_STRUCT & io_sc )
{
uint32_t signature = 0;
@@ -260,5 +303,9 @@ uint32_t DsdEvent<TYPE_MBA>::startNextPhase( STEP_CODE_DATA_STRUCT & io_sc )
//------------------------------------------------------------------------------
+// Avoid linker errors with the template.
+template class DsdEvent<TYPE_MBA>;
+template class DsdEvent<TYPE_OCMB_CHIP>;
+
} // end namespace PRDF
OpenPOWER on IntegriCloud